:root {
  --bg: #f5f6f9;
  --surface: #ffffff;
  --text: #0b0f19;
  --muted: #5b6475;
  --border: #e3e7ee;
  --brand: #2563eb;
  --brand-soft: #e8efff;
  --join: #059669;
  --danger: #dc2626;
  --warn: #c2410c;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f19;
    --surface: #151a23;
    --text: #f5f6f9;
    --muted: #98a2b3;
    --border: #262d3a;
    --brand: #5b8cff;
    --brand-soft: #1b2640;
    --join: #10b981;
    --danger: #f87171;
    --warn: #fb923c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Outfit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 15px; margin: 24px 0 8px; color: var(--muted); font-weight: 600; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Layout: side nav on wide screens, top tabs on phones */
.shell { display: flex; min-height: 100vh; }
.nav {
  width: 220px; flex: none; padding: 20px 12px; border-right: 1px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column; gap: 2px;
}
.brand { padding: 4px 12px 16px; }
h1 { font-weight: 800; letter-spacing: -.02em; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 500;
}
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav .spacer { flex: 1; }
main { flex: 1; min-width: 0; padding: 32px 40px; max-width: 820px; }
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .nav {
    width: auto; flex-direction: row; align-items: center; gap: 4px; padding: 10px 16px;
    border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto;
  }
  .brand { padding: 0 8px 0 0; }
  .nav .spacer { display: none; }
  main { padding: 20px 16px; }
}

/* Cards and rows */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.bar { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.time { width: 72px; flex: none; font-variant-numeric: tabular-nums; font-size: 13px; }
.tag { font-size: 12px; font-weight: 600; color: var(--warn); margin-left: 6px; }

/* Controls */
button, .button {
  font: inherit; font-weight: 600; border-radius: 10px; padding: 9px 16px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background-color .15s, border-color .15s;
}
button:hover, .button:hover { border-color: var(--muted); text-decoration: none; }
button.primary, .button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover { filter: brightness(1.06); }
button.join { background: var(--join); border-color: var(--join); color: #fff; padding: 6px 12px; min-height: 32px; font-size: 13px; }
button.danger { color: var(--danger); }
button.link { border: 0; background: none; color: var(--brand); padding: 0; min-height: 0; font-weight: 500; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input[type=text], input[type=email], input[type=password] {
  font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
label.field { display: block; margin-bottom: 12px; }
label.field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 12px; background: var(--border); transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
.toggles { display: flex; gap: 20px; flex-wrap: wrap; }
.toggles label { display: flex; align-items: center; gap: 8px; font-size: 13px; }

/* Sign-in */
.auth { max-width: 400px; margin: 10vh auto; padding: 0 16px; }
.auth .card { padding: 24px; }
.stack { display: grid; gap: 10px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 8px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 10px; padding: 3px; margin-bottom: 16px; }
.tabs button { border: 0; background: none; min-height: 34px; padding: 4px; }
.tabs button[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.error { color: var(--danger); font-size: 13px; margin-top: 8px; }
.qr { display: flex; justify-content: center; margin: 12px 0; }
.qr img { width: 180px; height: 180px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 8px; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; letter-spacing: .03em; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 12px 0; }
.empty { padding: 40px 16px; text-align: center; }
.loading { padding: 40px 0; text-align: center; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Event details */
button.event-link { font-weight: 500; color: var(--text); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
button.event-link:hover { color: var(--brand); text-decoration: underline; }
dialog.event {
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text);
  width: min(440px, calc(100vw - 32px)); padding: 20px 24px 24px;
}
dialog.event::backdrop { background: rgba(15, 23, 42, .45); }
.event-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.event-head .close { margin-left: auto; font-size: 18px; color: var(--muted); min-width: 32px; min-height: 32px; }
dialog.event h1 { font-size: 20px; margin-bottom: 8px; }
button.join-wide { background: var(--join); border-color: var(--join); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); margin-right: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 8px; }
.stat { padding: 14px 16px; display: flex; flex-direction: column; }
.stat b { font-size: 22px; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr 1fr; } }
form.row { margin: 0; }

/* Add calendar menu */
.add-menu { position: relative; display: inline-block; }
.add-menu summary { list-style: none; }
.add-menu summary::-webkit-details-marker { display: none; }
.add-menu .menu { position: absolute; z-index: 10; margin-top: 6px; min-width: 240px; padding: 6px; text-align: left; box-shadow: 0 8px 24px rgba(15,23,42,.12); }
.menu-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; min-height: 0; font-weight: 500; text-align: left; }
button.menu-item:hover { background: var(--bg); }
.menu-item.disabled { color: var(--muted); cursor: default; }
.choice { cursor: pointer; align-items: flex-start; }
.choice input[type=radio] { margin-top: 4px; accent-color: var(--brand); }

/* Landing */
html { scroll-behavior: smooth; }
.landing { min-height: 100vh; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.display { font-size: clamp(36px, 5.2vw, 56px); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; margin: 16px 0; }
.display .accent { color: var(--brand); }
.lead { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 520px; margin-bottom: 28px; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.button.lg { min-height: 48px; padding: 12px 24px; font-size: 16px; }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px 0; box-shadow: 0 24px 48px -24px rgba(15,23,42,.25); }
.mock-head { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 18px 12px; }
.mock-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); }
.mock-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mock-row .title { font-weight: 600; }
.mock-row.hold .title { color: var(--muted); font-style: italic; }
.mock-row.hold .bar { opacity: .45; }
.mock-join { font-size: 13px; font-weight: 600; color: #fff; background: var(--join); border-radius: 8px; padding: 4px 12px; }
.band { background: var(--surface); border-block: 1px solid var(--border); padding: 64px 0; }
.section-title { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -.02em; margin: 0 0 28px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.feature h3 { font-size: 17px; margin: 14px 0 6px; }
.feature-icon { display: inline-flex; width: 40px; height: 40px; border-radius: 10px; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); }
.split { display: grid; grid-template-columns: 1fr 420px; gap: 56px; align-items: start; padding-block: 72px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 16px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .icon { color: var(--join); flex: none; margin-top: 3px; }
.auth-card { padding: 24px; scroll-margin-top: 88px; }
.card-title { font-size: 20px; font-weight: 800; color: var(--text); margin: 0 0 16px; }
.site-foot { border-top: 1px solid var(--border); padding: 24px 0; }
.site-foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0; }
  .features { grid-template-columns: 1fr; gap: 24px; }
  .band { padding: 48px 0; }
  .split { padding-block: 48px; }
  .lead { font-size: 16px; }
}

/* App shell polish */
.nav { position: sticky; top: 0; height: 100vh; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; }
main h1 { font-size: 28px; }
.card { box-shadow: 0 1px 2px rgba(15,23,42,.04); }
@media (max-width: 760px) { .nav { height: auto; z-index: 20; } }

/* Plan and legal pages */
.plan-wrap { padding-block: 64px; }
.plan { max-width: 420px; padding: 28px; display: grid; gap: 18px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; }
.plan-head h3 { margin: 0; font-size: 20px; }
.plan-price { margin: 0; }
.plan-price b { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.legal { max-width: 720px; padding-block: 48px 72px; font-size: 16px; line-height: 1.7; }
.legal .display { font-size: clamp(32px, 5vw, 44px); margin-bottom: 4px; }
.legal h2 { font-size: 20px; color: var(--text); font-weight: 800; margin: 32px 0 8px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
@media (max-width: 560px) { .plan-wrap { padding-block: 48px; } .plan { padding: 20px; } }
.plan-wrap.split { align-items: center; padding-block: 64px; }
.plan-wrap .lead { margin-bottom: 0; }
.checks-grid { grid-template-columns: 1fr 1fr; gap: 16px 40px; }
.signin-wrap { max-width: 468px; padding-block: 72px; text-align: center; }
.signin-wrap .auth-card { text-align: left; }
@media (max-width: 760px) { .checks-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .signin-wrap { padding-block: 48px; } }
.tag.pending { color: var(--muted); }

/* Feedback */
textarea { font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); resize: vertical; }
textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
form.feedback { padding: 20px; margin-top: 16px; }
.feedback-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.join-text { color: var(--join); font-weight: 600; }
.feedback-msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.row.done .feedback-msg { color: var(--muted); }

/* Invitations not yet accepted: faded and hatched, dashed bar, badge */
:root { --hatch: rgba(91,100,117,.10); }
@media (prefers-color-scheme: dark) { :root { --hatch: rgba(152,162,179,.10); } }
.row.pending { background: repeating-linear-gradient(135deg, var(--hatch) 0 6px, transparent 6px 12px); }
.row.pending > *, .row.pending .grow .title, .row.pending .cal-name { opacity: .55; }
.row.pending > .grow { opacity: 1; }
.row.pending .bar { background: repeating-linear-gradient(180deg, var(--c) 0 4px, transparent 4px 7px) !important; opacity: .9; }
.row.pending .event-link { font-style: italic; font-weight: 500; }
.row.pending button.join { background: transparent; color: var(--muted); border: 1px dashed var(--muted); }
.badge-pending { font-size: 12px; font-weight: 600; color: var(--c); margin-left: 6px; }

/* AI assistants */
.token-box { padding: 16px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.token-box p { margin: 0; }
.snippet { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.snippet code, .snippet pre { flex: 1; min-width: 0; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.assistants { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.assistant { padding: 16px; }
.assistant-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 16px; }
.assistant ol { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.assistant.soon { opacity: .75; }
.assistant.soon p { margin-top: 10px; }
details.dev { margin-top: 24px; }
details.dev summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.consent { margin: 16px 0; font-size: 15px; }
.consent-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
@media (max-width: 760px) { .assistants { grid-template-columns: 1fr; } }

/* "Connect your AI assistant" starts folded: a card that says Show / Hide */
details.ai-section { margin-top: 24px; }
details.ai-section > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 56px; transition: border-color .15s; }
details.ai-section > summary::-webkit-details-marker { display: none; }
details.ai-section > summary:hover { border-color: var(--brand); }
details.ai-section > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ai-sum-text { display: flex; flex-direction: column; gap: 2px; }
.ai-sum-text b { font-size: 16px; }
.ai-toggle { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 600; flex: none; }
.ai-toggle .icon { transition: transform .15s; }
details.ai-section[open] .ai-toggle .icon { transform: rotate(180deg); }
details.ai-section .when-open, details.ai-section[open] .when-closed { display: none; }
details.ai-section[open] .when-open { display: inline; }
details.ai-section .fold-body { margin-top: 4px; }
details.ai-section .fold-body > h2:first-child { margin-top: 16px; }

/* Admin: capacity and money */
.ok { color: var(--join); } .warn { color: var(--warn); } .bad { color: var(--danger); }
.money-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.money-grid .row span { font-variant-numeric: tabular-nums; font-weight: 600; }
.meter-row .grow { display: grid; gap: 6px; }
.meter-head { display: flex; justify-content: space-between; gap: 12px; }
.meter { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; }
.meter i.ok { background: var(--join); } .meter i.warn { background: var(--warn); } .meter i.bad { background: var(--danger); }
.usage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
@media (max-width: 640px) { .money-grid { grid-template-columns: 1fr; } .usage-grid { grid-template-columns: 1fr 1fr; } }

/* Admin sub-pages */
.subnav { display: flex; gap: 4px; margin: 4px 0 20px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.subnav a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }

/* Platform admins */
select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); min-height: 40px; }
details.levels { margin-top: 10px; }
details.levels summary { cursor: pointer; color: var(--brand); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
#add-admin { flex-wrap: wrap; }
.price-form { display: flex; gap: 8px; }
.price-form input { width: 200px; }
ol.steps { margin: 0; padding-left: 18px; display: grid; gap: 10px; }
ol.steps .snippet { margin-top: 6px; }
@media (max-width: 640px) { .price-form input { width: 140px; } }

/* Error popup: a friendly joke, the code to quote, Try again */
.oops-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgb(11 15 25 / 0.55); animation: oops-fade 0.15s ease-out; }
.oops { width: min(420px, 100%); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: 0 20px 50px rgb(0 0 0 / 0.25); }
.oops h2 { color: var(--text); font-size: 20px; margin: 12px 0 8px; line-height: 1.3; }
.oops-mark { border-radius: 14px; animation: oops-wobble 1.6s ease-in-out infinite; }
.oops-report textarea { width: 100%; margin-top: 8px; font: inherit; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); resize: vertical; }
.oops-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.oops-actions button { min-height: 44px; }
@keyframes oops-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes oops-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .oops-mark, .oops-backdrop { animation: none; } }

/* Admin › Errors */
.err-src { font-size: 12px; font-weight: 600; color: var(--brand); margin: 0 4px; }
.err-fixed { opacity: 0.55; }
.err-stack { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 240px; overflow: auto; background: var(--bg); padding: 8px; border-radius: 8px; }

/* Two-step verification: the nudge on Calendar, the Account card and the Admin gate */
.nudge { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.nudge .row { gap: 12px; flex-wrap: wrap; }
.nudge-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.ts-setup { padding: 0 16px 8px; }
.ts-form { align-items: flex-end; gap: 8px; }
.gate { text-align: center; margin: 24px auto; }
.gate .nudge-icon { width: 48px; height: 48px; margin-bottom: 8px; }

/* Landing: three plans side by side, stacked on phones */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; align-items: stretch; }
.plans .plan { max-width: none; gap: 10px; align-content: start; grid-template-rows: auto auto auto auto 1fr auto; }
.plans .plan-yearly, .plans .plan p.small { margin: 0; }
.plans .plan .checks { margin: 4px 0 8px; }
.plan-featured { border: 2px solid var(--brand); box-shadow: 0 12px 30px rgb(37 99 235 / 0.12); }
.plans-note { margin-top: 16px; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; max-width: 440px; } }
.plans .plan .checks { align-content: start; align-self: start; }

/* Admin › Issues */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.chip { border-radius: 999px; min-height: 36px; padding: 6px 14px; }
.chip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.err-msg { white-space: pre-wrap; margin: 2px 0; }
.err-reply { margin-top: 6px; padding: 8px 10px; background: var(--bg); border-radius: 8px; white-space: pre-wrap; }
.err-reply-form { display: grid; gap: 8px; margin-top: 8px; }
.err-reply-form textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); resize: vertical; }
.err-reply-form button { justify-self: start; }
.err-actions { display: flex; flex-direction: column; gap: 6px; }

/* Landing mockup: an invitation not yet accepted, styled like the real agenda */
.mock-row.pending { background: repeating-linear-gradient(135deg, var(--hatch) 0 6px, transparent 6px 12px); }
.mock-row.pending .time, .mock-row.pending .title { opacity: .55; }
.mock-row.pending .title { font-style: italic; font-weight: 500; }
.mock-row.pending .bar { background: repeating-linear-gradient(180deg, var(--c) 0 4px, transparent 4px 7px) !important; }
.help-tabs { margin: 8px 0 12px; max-width: 440px; background: var(--surface); border: 1px solid var(--border); }
.help-tabs button[aria-selected="true"] { background: var(--brand-soft); color: var(--brand); }

/* Calendar colour picker (Plus and Pro) */
.dot-pick { width: 20px; height: 20px; min-height: 0; padding: 0; border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--border); cursor: pointer; flex: none; }
.dot-pick:hover { box-shadow: 0 0 0 2px var(--muted); }
.color-pop { margin: 4px 0 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--text); }

/* Settings polish: account header with a quiet Disconnect, a marked-off danger zone */
.acct-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.acct-head h2 { min-width: 0; overflow-wrap: anywhere; }
.acct-head .link { min-height: 44px; padding: 0 4px; flex: none; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.acct-head .link.danger { color: var(--danger); font-weight: 500; }

/* Landing: the calendars Syncydo works with, a plain line under the hero button */
.works-with { margin: 16px 0 0; max-width: 34em; line-height: 1.5; }

.mobile-brand { display: none; }
/* Phone width: the main nav becomes a bottom tab bar (like the apps), titles get two lines,
   and the Admin tabs show they scroll */
button.event-link { display: block; width: 100%; justify-content: flex-start; }
@media (max-width: 760px) {
  .nav {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 30;
    justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-bottom: 0; border-top: 1px solid var(--border); overflow: visible;
  }
  .nav .brand { display: none; }
  .nav a {
    flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; min-height: 52px; padding: 6px 2px;
    font-size: 11px; font-weight: 600; justify-content: center; text-align: center; border-radius: 10px;
  }
  .nav a .icon { width: 22px; height: 22px; }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .mobile-brand { display: block; padding: 16px 16px 0; }
  .row button.link { min-height: 44px; padding: 0 6px; }
  button.event-link { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .subnav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}

/* Landing: softer and friendlier, like the emails. Scoped so the app itself stays calm. */
.landing .dots { display: flex; gap: 8px; margin-bottom: 14px; }
.landing .dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.landing .dots i:nth-child(1) { --c: #EF4444; } .landing .dots i:nth-child(2) { --c: #F59E0B; } .landing .dots i:nth-child(3) { --c: #10B981; }
.landing .dots i:nth-child(4) { --c: #3B82F6; } .landing .dots i:nth-child(5) { --c: #A855F7; }
.landing .card, .landing .plan, .landing .mock { border-radius: 20px; box-shadow: 0 1px 2px rgb(11 15 25 / .04), 0 8px 24px rgb(11 15 25 / .06); }
.landing .button { border-radius: 999px; }
.landing .feature { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease-out; }
.landing .feature:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgb(11 15 25 / .08); }
.landing .feature-icon { width: 44px; height: 44px; border-radius: 14px; }
.landing .feature:nth-child(1) .feature-icon { background: #FEE2E2; color: #DC2626; }
.landing .feature:nth-child(2) .feature-icon { background: #FEF3C7; color: #B45309; }
.landing .feature:nth-child(3) .feature-icon { background: #D1FAE5; color: #047857; }
.landing .feature:nth-child(4) .feature-icon { background: #EDE9FE; color: #7C3AED; }
.landing .band { background: linear-gradient(180deg, #F5F8FF, var(--surface)); }
@media (prefers-color-scheme: dark) {
  .landing .band { background: var(--surface); }
  .landing .feature:nth-child(n) .feature-icon { background: var(--brand-soft); color: var(--brand); }
}
@media (prefers-reduced-motion: reduce) { .landing .feature { transition: none; } .landing .feature:hover { transform: none; } }

/* Admin › Inbox */
.inbox-row.unread .inbox-open { font-weight: 800; }
.inbox-row.unread::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; align-self: center; margin-right: 4px; }
.inbox-open { text-align: left; font-weight: 600; color: var(--text); }
.inbox-body { margin-top: 10px; }
.inbox-text { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin: 0 0 10px; max-height: 420px; overflow: auto; }
.inbox .row-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }

/* "Syncydo has been updated · Refresh" after a deploy */
.update-note { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px; background: var(--text); color: var(--bg); padding: 10px 12px 10px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgb(0 0 0 / .2); font-size: 14px; }
.update-note button { background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 600; cursor: pointer; }
@media (max-width: 720px) { .update-note { bottom: calc(76px + env(safe-area-inset-bottom)); } }

.staging-ribbon { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 60; background: #F59E0B; color: #0B0F19; font: 600 12px/1 system-ui, sans-serif; padding: 5px 12px; border-radius: 0 0 8px 8px; pointer-events: none; }
