/* ============ schedulebot · brainbot design system ============ */

:root {
  --bb-orange: #FF6314;
  --bb-orange-light: #FF9142;
  --bb-slate: #1F2A33;
  --bb-petrol: #0E2128;
  --bb-sky: #E8ECEF;
  --bb-light-grey: #F0F0F0;
  --bb-light: #F6F6F6;
  --bb-white: #FFFFFF;
  --bb-grey: #73828D;

  --bg: var(--bb-sky);
  --card: var(--bb-white);
  --card-soft: var(--bb-light);
  --ink: var(--bb-slate);
  --ink-strong: var(--bb-petrol);
  --muted: var(--bb-grey);
  --accent: var(--bb-orange);
  --accent-light: var(--bb-orange-light);
  --border: color-mix(in srgb, var(--bb-slate) 12%, transparent);
  --border-strong: color-mix(in srgb, var(--bb-slate) 24%, transparent);
  --danger: #C5341B;

  --dark-bg: var(--bb-petrol);
  --dark-ink: var(--bb-white);

  --vote-yes-bg: var(--bb-petrol);
  --vote-yes-fg: var(--bb-white);
  --vote-maybe-bg: color-mix(in srgb, var(--bb-orange-light) 26%, var(--bb-white));
  --vote-maybe-fg: #9A4A0A;
  --vote-no-bg: color-mix(in srgb, var(--bb-grey) 16%, var(--bb-white));
  --vote-no-fg: var(--bb-grey);

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(14, 33, 40, .06);
  --shadow-md: 0 6px 18px rgba(14, 33, 40, .08);
  --shadow-lg: 0 18px 48px rgba(14, 33, 40, .16);
  --focus: 0 0 0 3px color-mix(in srgb, var(--bb-orange) 35%, transparent);

  --ease: cubic-bezier(.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--bb-petrol);
    --card: var(--bb-slate);
    --card-soft: color-mix(in srgb, var(--bb-white) 5%, var(--bb-slate));
    --ink: var(--bb-white);
    --ink-strong: var(--bb-white);
    --muted: color-mix(in srgb, var(--bb-white) 55%, transparent);
    --border: color-mix(in srgb, var(--bb-white) 10%, transparent);
    --border-strong: color-mix(in srgb, var(--bb-white) 26%, transparent);

    --dark-bg: var(--bb-deep, #0B0B0B);

    --vote-yes-bg: var(--bb-sky);
    --vote-yes-fg: var(--bb-petrol);
    --vote-maybe-bg: color-mix(in srgb, var(--bb-orange-light) 30%, var(--bb-slate));
    --vote-maybe-fg: var(--bb-orange-light);
    --vote-no-bg: color-mix(in srgb, var(--bb-white) 8%, var(--bb-slate));
    --vote-no-fg: var(--muted);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-feature-settings: "ss01";
}

::selection { background: color-mix(in srgb, var(--bb-orange) 30%, transparent); }

/* ---------- type helpers ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.eyebrow::before { content: ''; width: 8px; height: 8px; background: var(--accent); flex-shrink: 0; }
.eyebrow.no-square::before { display: none; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- header / footer ---------- */

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 40px);
  max-width: 1100px; width: 100%; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 31px; display: block; }
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: -.02em; line-height: 1; }
.brand-by {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  transform: translateY(3px);
}
.site-footer {
  margin-top: auto;
  padding: 40px 16px 44px; text-align: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

.app { width: 100%; max-width: 1100px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 40px; }

/* ---------- hero ---------- */

.hero { padding: clamp(28px, 6vw, 64px) 0 clamp(28px, 5vw, 48px); max-width: 780px; }
.hero h1 {
  font-weight: 900;
  font-size: clamp(40px, 7.5vw, 76px);
  line-height: .95;
  letter-spacing: -.035em;
  text-transform: uppercase;
  margin: 0 0 22px;
  color: var(--ink-strong);
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { color: var(--muted); font-size: clamp(16px, 2.4vw, 19px); line-height: 1.55; margin: 0; max-width: 560px; }
.hero .micro { display: block; margin-top: 26px; }

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.4vw, 34px);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.step-label {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: .06em; color: var(--accent); text-transform: uppercase;
  display: block; margin-bottom: 8px;
}
.card h2 { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--ink-strong); }
.card .sub { margin: 0 0 20px; color: var(--muted); font-size: 15px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px; line-height: 1;
  padding: 13px 24px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--accent);
  background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none; user-select: none; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
.btn:hover { background: var(--accent); color: var(--bb-petrol); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn .arrow { font-family: var(--font-sans); transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-filled { background: var(--accent); color: var(--bb-petrol); }
.btn-filled:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn-dark { background: var(--ink-strong); border-color: var(--ink-strong); color: var(--card); }
.btn-dark:hover { background: var(--accent); border-color: var(--accent); color: var(--bb-petrol); }
.btn-quiet { border-color: var(--border-strong); color: var(--ink); }
.btn-quiet:hover { background: var(--ink-strong); border-color: var(--ink-strong); color: var(--card); }
.btn-danger { border-color: var(--border-strong); color: var(--danger); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-lg { padding: 17px 32px; font-size: 17px; }
.btn-block { width: 100%; }

.linkish {
  border: 0; background: none; color: var(--accent); font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; padding: 2px 0; text-decoration: none;
}
.linkish:hover { text-decoration: underline; }
.linkish:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

/* ---------- forms ---------- */

.input, .textarea {
  font: inherit; color: var(--ink);
  background: var(--card-soft);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm); padding: 12px 14px; width: 100%;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); background: var(--card); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { resize: vertical; min-height: 68px; }
.field { margin-bottom: 16px; }
.field label {
  display: block; margin-bottom: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .grow { flex: 1 1 220px; }

/* ---------- segmented (create settings) ---------- */

.seg { display: inline-flex; background: var(--card-soft); border-radius: var(--radius-pill); padding: 4px; gap: 4px; }
.seg button {
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--muted);
  background: transparent; border: 0; border-radius: var(--radius-pill); padding: 8px 18px; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--ink-strong); color: var(--card); }
.seg button:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- calendar ---------- */

.when-wrap { display: flex; gap: clamp(20px, 4vw, 44px); flex-wrap: wrap; }
.cal { flex: 0 1 330px; min-width: 270px; }
.when-days { flex: 1 1 300px; min-width: 0; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button {
  width: 34px; height: 34px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong);
  background: transparent; color: var(--ink); font-size: 16px; cursor: pointer; line-height: 1;
  transition: all .2s var(--ease);
}
.cal-nav button:hover { border-color: var(--accent); color: var(--accent); }
.cal-nav button:focus-visible { outline: none; box-shadow: var(--focus); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow {
  text-align: center; padding: 6px 0;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.cal-day {
  aspect-ratio: 1; border: 0; border-radius: var(--radius-sm); background: transparent;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; position: relative;
  transition: background .15s var(--ease);
}
.cal-day:hover:not(:disabled) { background: color-mix(in srgb, var(--bb-orange) 14%, transparent); }
.cal-day:focus-visible { outline: none; box-shadow: var(--focus); }
.cal-day:disabled { color: var(--muted); opacity: .35; cursor: default; }
.cal-day.today::after {
  content: ''; position: absolute; bottom: 5px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--accent);
}
.cal-day[aria-pressed="true"] { background: var(--accent); color: var(--bb-petrol); font-weight: 700; }
.cal-day[aria-pressed="true"].today::after { background: var(--bb-petrol); }

/* ---------- day slots editor ---------- */

.day-item { background: var(--card-soft); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 10px; }
.day-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day-item-date { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.icon-x {
  border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1;
  border-radius: var(--radius-pill); width: 28px; height: 28px; flex-shrink: 0;
  transition: all .15s var(--ease);
}
.icon-x:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.icon-x:focus-visible { outline: none; box-shadow: var(--focus); }
.slot-row { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.slot-row input[type="time"] {
  font: inherit; font-size: 14px; padding: 7px 9px; border: 1.5px solid transparent;
  border-radius: var(--radius-sm); background: var(--card); color: var(--ink); width: 100px;
}
.slot-row input[type="time"]:focus { outline: none; border-color: var(--accent); }
.slot-dash { color: var(--muted); }
.allday-chip {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--card); border-radius: var(--radius-pill); padding: 5px 12px;
}
.day-item-foot { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.empty-days { color: var(--muted); font-size: 14.5px; padding: 12px 2px; max-width: 380px; }

/* ---------- poll header ---------- */

.poll-head { padding: clamp(10px, 2vw, 22px) 0 18px; }
.poll-head .title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.poll-head h1 {
  margin: 0; font-size: clamp(28px, 5vw, 44px); font-weight: 900;
  letter-spacing: -.03em; line-height: 1.05; color: var(--ink-strong); text-wrap: balance;
}
.poll-meta { margin-top: 10px; display: flex; gap: 8px 18px; flex-wrap: wrap; }
.poll-desc { margin: 14px 0 0; color: var(--muted); font-size: 15.5px; white-space: pre-wrap; max-width: 640px; }
.status-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  border-radius: var(--radius-pill); padding: 7px 14px; white-space: nowrap;
  background: var(--card); color: var(--muted); box-shadow: var(--shadow-sm);
}
.status-tag.is-final { background: var(--ink-strong); color: var(--card); }

/* ---------- scheduled (final) panel ---------- */

.final-panel {
  background: var(--bb-petrol); color: var(--bb-white);
  border-radius: var(--radius-lg); padding: clamp(24px, 3.5vw, 36px);
  margin-bottom: 16px;
}
.final-panel .eyebrow { color: var(--accent-light); }
.final-panel .eyebrow::before { background: var(--accent-light); }
.final-when { font-size: clamp(22px, 3.6vw, 32px); font-weight: 900; letter-spacing: -.025em; line-height: 1.15; margin: 2px 0 6px; }
.final-where { color: color-mix(in srgb, var(--bb-white) 60%, transparent); font-size: 15px; }
.final-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.final-panel .btn { border-color: color-mix(in srgb, var(--bb-white) 35%, transparent); color: var(--bb-white); }
.final-panel .btn:hover { background: var(--bb-white); color: var(--bb-petrol); border-color: var(--bb-white); }
.final-panel .btn-filled { background: var(--accent); border-color: var(--accent); color: var(--bb-petrol); }
.final-panel .btn-filled:hover { background: var(--accent-light); border-color: var(--accent-light); }

/* ---------- option rows ---------- */

.options { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.opt {
  background: var(--card); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: border-color .2s var(--ease);
}
.opt.is-leading { border-color: color-mix(in srgb, var(--bb-orange) 55%, transparent); }
.opt.is-final { border-color: var(--ink-strong); }
.opt-main {
  display: grid; grid-template-columns: auto 1fr auto; gap: 8px 16px; align-items: center;
  padding: 14px 16px;
}
.leaf {
  width: 58px; height: 58px; border-radius: var(--radius-sm);
  background: var(--card-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1; gap: 2px; flex-shrink: 0;
}
.leaf .l-dow { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.leaf .l-day { font-size: 21px; font-weight: 900; letter-spacing: -.02em; color: var(--ink-strong); }
.leaf .l-mon { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.opt.is-final .leaf { background: var(--ink-strong); }
.opt.is-final .leaf .l-day { color: var(--card); }
.opt.is-final .leaf .l-dow, .opt.is-final .leaf .l-mon { color: color-mix(in srgb, var(--card) 60%, transparent); }

.opt-info { min-width: 0; }
.opt-time { font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt-tagline {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent);
}
.opt-tagline.t-final { color: var(--ink-strong); }
.avail { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.avail-track {
  height: 6px; border-radius: var(--radius-pill); background: var(--bg);
  flex: 0 1 180px; overflow: hidden; display: flex;
}
.avail-yes { background: var(--accent); height: 100%; }
.avail-maybe { background: color-mix(in srgb, var(--accent-light) 45%, var(--bg)); height: 100%; }
.avail-count { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.opt-actions { display: flex; align-items: center; gap: 6px; }
.vote-seg { display: inline-flex; gap: 5px; }
.vote-btn {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
  border: 1.5px solid var(--border-strong); background: transparent; color: var(--muted);
  border-radius: var(--radius-pill); padding: 0 13px; height: 36px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s var(--ease);
}
.vote-btn:hover { border-color: var(--ink); color: var(--ink); }
.vote-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.vote-btn[aria-pressed="true"].v-yes { background: var(--vote-yes-bg); border-color: var(--vote-yes-bg); color: var(--vote-yes-fg); }
.vote-btn[aria-pressed="true"].v-maybe { background: var(--vote-maybe-bg); border-color: var(--vote-maybe-bg); color: var(--vote-maybe-fg); }
.vote-btn[aria-pressed="true"].v-no { background: var(--vote-no-bg); border-color: var(--vote-no-bg); color: var(--vote-no-fg); }

.opt-expand {
  border: 0; background: none; cursor: pointer; color: var(--muted);
  width: 34px; height: 34px; border-radius: var(--radius-pill); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s var(--ease);
}
.opt-expand:hover { background: var(--card-soft); color: var(--ink); }
.opt-expand:focus-visible { outline: none; box-shadow: var(--focus); }
.opt-expand svg { transition: transform .2s var(--ease); }
.opt-expand[aria-expanded="true"] svg { transform: rotate(180deg); }

.opt-detail { padding: 2px 16px 16px; border-top: 1px solid var(--border); margin: 0 16px 0; padding-left: 0; padding-right: 0; }
.who-group { margin-top: 12px; }
.who-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.who-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card-soft); border-radius: var(--radius-pill); padding: 5px 12px;
  font-size: 13.5px; font-weight: 500;
}
.who-chip .icon-x { width: 20px; height: 20px; font-size: 12px; margin-right: -4px; }
.who-empty { color: var(--muted); font-size: 13.5px; margin-top: 8px; }

.select-btn { margin-left: 4px; }

/* ---------- options tools (view toggle + bulk answers) ---------- */

.options-tools {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px 16px; flex-wrap: wrap; margin-top: 14px;
}
.seg-sm button { padding: 6px 14px; font-size: 13px; }
.quick-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.quick-sep { color: var(--muted); }
.quick-reset { color: var(--muted); }

/* ---------- calendar answer view ---------- */

.cav {
  background: var(--card); border-radius: var(--radius-md);
  padding: clamp(16px, 2.5vw, 24px); box-shadow: var(--shadow-sm); margin-top: 12px;
}
.cav-months { display: flex; gap: 30px; flex-wrap: wrap; }
.cav-month { flex: 1 1 250px; max-width: 330px; min-width: 230px; }
.cav-title { font-weight: 700; font-size: 15px; letter-spacing: -.01em; margin-bottom: 8px; }
.cav-day {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; background: transparent;
  font: inherit; font-size: 13.5px; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  position: relative; padding: 0;
}
.cav-day.off { color: var(--muted); opacity: .35; }
.cav-day.has-opt { border-color: var(--border-strong); cursor: pointer; font-weight: 600; transition: all .12s var(--ease); }
.cav-day.has-opt:hover { border-color: var(--ink); }
.cav-day.has-opt:focus-visible { outline: none; box-shadow: var(--focus); }
.cav-day.s-yes { background: var(--vote-yes-bg); border-color: var(--vote-yes-bg); color: var(--vote-yes-fg); }
.cav-day.s-maybe { background: var(--vote-maybe-bg); border-color: var(--vote-maybe-bg); color: var(--vote-maybe-fg); }
.cav-day.s-no { background: var(--vote-no-bg); border-color: var(--vote-no-bg); color: var(--vote-no-fg); }
.cav-day.s-mixed { background: var(--card-soft); }
.cav-day.sel { box-shadow: var(--focus); }
.cav-day.final-day { border-color: var(--ink-strong); border-width: 2px; }
.cav-num { line-height: 1; }
.cav-n {
  position: absolute; top: 3px; right: 5px;
  font-family: var(--font-mono); font-size: 9px; opacity: .75;
}
.cav-bar {
  width: 58%; height: 3px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, currentColor 18%, transparent);
  overflow: hidden; display: block;
}
.cav-bar-fill { height: 100%; background: var(--accent); display: block; }
.cav-legend {
  display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center;
  margin-top: 16px; font-size: 12.5px; color: var(--muted);
}
.cav-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.cav-legend .sw { width: 13px; height: 13px; border-radius: 4px; display: inline-block; border: 1.5px solid transparent; }
.cav-legend .sw-yes { background: var(--vote-yes-bg); }
.cav-legend .sw-maybe { background: var(--vote-maybe-bg); }
.cav-legend .sw-no { background: var(--vote-no-bg); }
.cav-legend .sw-none { border-color: var(--border-strong); }
.day-panel { margin-top: 14px; }

/* ---------- answering-as strip / sticky save bar ---------- */

.answer-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.savebar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(680px, calc(100vw - 24px));
  background: var(--bb-petrol); color: var(--bb-white);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 14px 16px; z-index: 40;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  animation: rise .25s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.savebar .input {
  flex: 1 1 160px; background: color-mix(in srgb, var(--bb-white) 8%, transparent);
  color: var(--bb-white); border-color: color-mix(in srgb, var(--bb-white) 20%, transparent);
}
.savebar .input::placeholder { color: color-mix(in srgb, var(--bb-white) 45%, transparent); }
.savebar .input:focus { border-color: var(--accent); background: color-mix(in srgb, var(--bb-white) 12%, transparent); }
.savebar .cancel { color: color-mix(in srgb, var(--bb-white) 60%, transparent); }
.savebar-err { flex-basis: 100%; color: var(--accent-light); font-size: 13px; margin: 0; }

/* ---------- share / settings ---------- */

.share-row { display: flex; gap: 10px; align-items: stretch; }
.share-row .input { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.alerts-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--card); border-radius: var(--radius-lg); padding: 20px 26px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.alerts-row .a-text { flex: 1 1 260px; }
.alerts-row .a-title { font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; }
.alerts-row .a-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.opt-manage { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.opt-manage:last-child { border-bottom: 0; }
.danger-zone { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; }

details.card > summary {
  cursor: pointer; font-weight: 700; font-size: 15.5px; letter-spacing: -.01em;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: '+'; font-size: 20px; color: var(--muted); font-weight: 400; }
details.card[open] > summary::after { content: '–'; }

/* ---------- modal & toasts ---------- */

.modal-back {
  position: fixed; inset: 0; background: color-mix(in srgb, var(--bb-petrol) 55%, transparent); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  max-width: 460px; width: 100%; padding: 30px;
}
.modal-wide { max-width: 540px; }
.mcp-steps { margin: 0 0 18px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.mcp-steps li { margin-bottom: 8px; }
.modal h3 { margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--ink-strong); }
.modal p { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--bb-petrol); color: var(--bb-white); font-size: 14px; font-weight: 500;
  border-radius: var(--radius-pill); padding: 11px 22px; box-shadow: var(--shadow-lg);
  animation: toast-in .18s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.err-text { color: var(--danger); font-size: 13.5px; margin-top: 10px; }
.center-note { text-align: center; color: var(--muted); padding: 80px 20px; }
.center-note .big { font-weight: 900; font-size: 26px; letter-spacing: -.02em; color: var(--ink-strong); margin-bottom: 8px; text-transform: uppercase; }

.skel { color: var(--muted); text-align: center; padding: 80px 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.spin {
  width: 22px; height: 22px; border-radius: 50%; margin: 0 auto 14px;
  border: 2.5px solid var(--border-strong); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */

@media (max-width: 700px) {
  .opt-main { grid-template-columns: auto 1fr auto; }
  .opt-actions { grid-column: 1 / -1; justify-content: space-between; }
  .vote-seg { flex: 1; }
  .vote-btn { flex: 1; justify-content: center; height: 40px; }
  .header-cta { display: none; }
  .avail-track { flex-basis: 120px; }
}
