:root {
  /* Matches alexeymk.com: Inter, navy headings, #3498db blue. */
  --bg: #fcfcfc;
  --fg: #333333;
  --heading: #2c3e50;
  --muted: #6b7a89;
  --card: #ffffff;
  --line: #ececec;
  --line-strong: #d9dde1;
  --shade: #f7f8fa;
  --accent: #3498db;
  --accent-hover: #2980b9;
  --accent-fg: #ffffff;
  --accent-soft: #eaf4fb;
  --danger: #c0392b;
  color-scheme: light dark;
}
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
:root {
}
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) {
    --bg: #111418;
    --fg: #e6e8eb;
    --heading: #f2f4f6;
    --muted: #9aa5b1;
    --card: #1a1e23;
    --line: #2a3038;
    --line-strong: #39414b;
    --shade: #161a1f;
    --accent: #5dade2;
    --accent-hover: #7fc0ea;
    --accent-fg: #0b1620;
    --accent-soft: #1b2c3a;
    --danger: #ec8b7e;
  }
}
html[data-theme="dark"] {
    --bg: #111418;
    --fg: #e6e8eb;
    --heading: #f2f4f6;
    --muted: #9aa5b1;
    --card: #1a1e23;
    --line: #2a3038;
    --line-strong: #39414b;
    --shade: #161a1f;
    --accent: #5dade2;
    --accent-hover: #7fc0ea;
    --accent-fg: #0b1620;
    --accent-soft: #1b2c3a;
    --danger: #ec8b7e;
  }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 "Inter", "Helvetica Neue", Arial, system-ui, sans-serif; }
a { color: var(--accent); }
h1, h2, h3 { letter-spacing: -0.015em; color: var(--heading); }
h2:focus { outline: none; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.error { color: var(--danger); font-weight: 500; }
.ok { color: var(--accent); font-weight: 500; }

/* ---------- shell ---------- */
.shell { max-width: 1120px; margin: 0 auto; padding: 32px 16px 48px; }
.panel {
  display: grid; grid-template-columns: 300px 1fr;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.05);
}
.side { padding: 28px 24px; border-right: 1px solid var(--line); }
.side h1 { font-size: 1.45rem; margin: 0 0 18px; }
.facts { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.facts li { display: flex; gap: 10px; align-items: flex-start; color: var(--fg); }
.facts svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.facts a { overflow-wrap: anywhere; }
.chosen { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 20px; }
.main { padding: 24px 28px; min-width: 0; }

/* ---------- mini calendar ---------- */
.minical { margin-top: 8px; }
.mc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mc-title { font-weight: 650; }
.mc-nav { display: flex; gap: 2px; }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mc-dow { font-size: 0.75rem; color: var(--muted); padding: 4px 0; }
.mc-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 999px; font: inherit; font-size: 0.875rem; color: var(--muted); border: 0; background: none; padding: 0;
}
.mc-day.out { visibility: hidden; }
.mc-day.inweek { background: var(--shade); }
.mc-day.has { color: var(--accent); background: var(--accent-soft); font-weight: 650; cursor: pointer; }
.mc-day.has:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mc-day.sel, .mc-day.has.sel { background: var(--accent); color: var(--accent-fg); }
.mc-day.today { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- buttons ---------- */
.icon-btn {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); background: var(--card); border-radius: 8px; cursor: pointer; color: var(--fg); padding: 0;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.mc-nav .icon-btn { border-color: transparent; }
.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
  border-radius: 8px; padding: 9px 16px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg);
}
.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--card); color: var(--fg); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--shade); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); padding-left: 0; padding-right: 0; }
.btn.small { font-size: 0.875rem; padding: 5px 12px; }
.btn.ghost.small { padding-left: 0; padding-right: 0; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- week grid ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-title { font-size: 1.3rem; margin: 0; }
.cal-nav { display: flex; gap: 6px; align-items: center; }
.weekgrid { position: relative; border-bottom: 1px solid var(--line); }
.wg-heads { display: grid; grid-template-columns: 52px repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.wg-dayhead { text-align: center; padding: 6px 0 10px; display: flex; flex-direction: column; }
.wg-dow { font-size: 0.8rem; color: var(--muted); }
.wg-date { font-size: 1.25rem; font-weight: 650; }
.wg-dayhead.none .wg-date { color: var(--muted); font-weight: 500; }
.wg-dayhead.today .wg-date { color: var(--accent); }
.wg-scroll { max-height: 540px; overflow-y: auto; }
.wg-cols { display: grid; grid-template-columns: 52px repeat(7, 1fr); }
.wg-gutter { position: relative; }
.wg-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.wg-col {
  position: relative; border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px);
}
.wg-col.none { background-color: var(--shade); }
.wg-slot {
  position: absolute; left: 4px; right: 4px; border-radius: 6px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-fg); font: inherit; font-size: 0.8rem; font-weight: 650;
  text-align: left; padding: 2px 8px; overflow: hidden; white-space: nowrap; line-height: 1.3;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.wg-slot:hover { background: var(--accent-hover); transform: translateY(-1px); }
.wg-slot.selected { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.wg-slot.current { background: repeating-linear-gradient(45deg, var(--shade), var(--shade) 6px, var(--card) 6px, var(--card) 12px); color: var(--muted); border: 1.5px dashed var(--line-strong); cursor: default; box-shadow: none; }
.wg-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--card) 70%, transparent); text-align: center;
}
.wg-empty p { margin: 0; font-weight: 600; }

.tz { margin: 14px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
select, input, textarea {
  font: inherit; color: inherit; background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 12px; width: 100%;
}
.tz select { width: auto; max-width: 100%; padding: 6px 10px; }

/* day list (phone) */
.daylist { display: none; }
.daylist h3 { font-size: 1rem; margin: 4px 0 10px; }
.daylist-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot {
  font: inherit; cursor: pointer; padding: 10px 6px; border-radius: 8px; font-weight: 650;
  border: 1px solid var(--accent); background: var(--card); color: var(--accent);
}
.slot.selected, .slot:hover { background: var(--accent); color: var(--accent-fg); }

.sticky-confirm { position: sticky; bottom: 12px; margin-top: 14px; }
.sticky-confirm .btn { width: 100%; box-shadow: 0 6px 20px rgba(0,0,0,.15); }

/* ---------- form / screens ---------- */
.form, .done { max-width: 520px; }
.form h2, .done h2 { font-size: 1.3rem; margin: 4px 0 8px; }
.back { margin-bottom: 4px; }
.when { font-size: 1.05rem; font-weight: 600; margin: 4px 0 14px; }
.field { margin: 14px 0; display: flex; flex-direction: column; gap: 4px; }
.field label { font-weight: 600; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.row form { margin: 0; }
.callout { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; }
.callout p { margin: 0 0 10px; }

/* server-rendered message pages */
.wrap { max-width: 640px; margin: 0 auto; padding: 32px 16px 48px; }
.head h1 { font-size: 1.5rem; margin: 0 0 8px; }
.card a { overflow-wrap: anywhere; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 16px 0; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 8px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }

.agent-note { margin-top: 32px; color: var(--muted); font-size: 0.85rem; max-width: 760px; }
.agent-note h2 { font-size: 0.9rem; margin-bottom: 4px; }
code { font-size: 0.85em; overflow-wrap: anywhere; }

/* ---------- single-column layout (header + main) ---------- */
.panel.single { display: block; max-width: 980px; margin: 0 auto; }
.top { display: flex; gap: 14px; align-items: center; padding: 24px 28px 4px; }
.avatar { width: 46px; height: 46px; flex: none; border-radius: 999px; background: #d9cbb8; color: #5a4a36; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.top h1 { font-size: 1.4rem; margin: 0; letter-spacing: -0.01em; }
.top .meta { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.top #side-extra:not(:empty) { margin-top: 8px; }
.top .chosen { margin: 0; display: inline-block; padding: 6px 10px; }
.panel.single .main { padding: 18px 28px 28px; }
.eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.sc-cta { margin-top: 8px; font-size: 0.82rem; font-weight: 650; color: var(--accent); }
.suggest .suggest-card { position: relative; background: var(--accent-soft); border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent); padding: 16px 18px 14px 58px; }
.suggest .suggest-card:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--card)); border-color: var(--accent); }
.sc-num {
  position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; border-radius: 999px;
  background: var(--accent); color: var(--accent-fg); font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.suggest .eyebrow { color: var(--accent); }
.day-panel.inline { margin: 6px 0 10px; }

/* week rows */
.weeks { border-top: 1px solid var(--line); }
.wk { position: relative; border-bottom: 1px solid var(--line); padding: 6px 0; }
.wk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wd { min-height: 92px; padding: 8px; border-radius: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.wd-label { font-size: 0.8rem; color: var(--muted); }
.wd.out > * { opacity: .35; }
.wd.past .wd-label { opacity: .6; }
.wd.open { background: var(--accent-soft); cursor: pointer; }
.wd.open:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.wd.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.wd-none { color: var(--muted); }
.wd-count { font-weight: 800; font-size: 1.02rem; color: var(--accent); }
.wd-range { font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.wd.open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ribbon {
  position: absolute; top: 6px; bottom: 6px; z-index: 1; padding-top: 20px !important; border-radius: 10px; border: 1px solid var(--trb, #e9c98a);
  background: repeating-linear-gradient(135deg, #fff3dc 0 8px, #fffaf0 8px 16px);
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; overflow: hidden; white-space: nowrap; color: #7a5a14; font-size: 0.9rem;
}
.ribbon strong { color: #6b4e10; }
.rb-status, .rb-sep { color: #8f7a52; }
.ribbon.short { flex-direction: column; gap: 2px; white-space: normal; text-align: center; font-size: 0.78rem; line-height: 1.2; padding: 4px 6px; }
.ribbon.short .rb-status, .ribbon.short .rb-sep { display: none; }
.ribbon.short strong { overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.ribbon.s1 .rb-emoji { display: none; }
.rb-action { font: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.day-panel .dp-title { margin-right: 10px; }
.day-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--shade); border: 0; }
.dp-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-slots .slot { padding: 7px 12px; }
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .ribbon { background: repeating-linear-gradient(135deg, #2e2615 0 8px, #241f13 8px 16px); border-color: #5a4720; color: #f1d9a4; }
html:not([data-theme="light"]) .ribbon strong { color: #f1d9a4; }
html:not([data-theme="light"]) .rb-status, html:not([data-theme="light"]) .rb-sep { color: #c9b27f; }
}
html[data-theme="dark"] .ribbon { background: repeating-linear-gradient(135deg, #2e2615 0 8px, #241f13 8px 16px); border-color: #5a4720; color: #f1d9a4; }
html[data-theme="dark"] .ribbon strong { color: #f1d9a4; }
html[data-theme="dark"] .rb-status, html[data-theme="dark"] .rb-sep { color: #c9b27f; }

/* ---------- streamlined request form ---------- */
.ask-form h2 { margin-bottom: 2px; }
.ask-form .field { margin: 12px 0; }
.toggles { display: flex; gap: 16px; flex-wrap: wrap; margin: -2px 0 6px; }
.more-toggle { font-size: 0.88rem; padding: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn.big { width: 100%; padding: 13px 16px; font-size: 1.05rem; margin-top: 8px; }
.ribbon.clickable { cursor: pointer; }
.ribbon.clickable:hover { border-color: #d8ad5a; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; gap: 0; } }

/* ---------- phone agenda ---------- */
.agenda { display: none; }
.ag-day {
  font: inherit; color: inherit; width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
}
.ag-day:active { background: var(--accent-soft); }
.ag-date { width: 48px; flex: none; text-align: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); padding: 6px 0; display: flex; flex-direction: column; }
.ag-dow { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ag-num { font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.ag-mid { flex: 1; display: flex; flex-direction: column; }
.ag-count { font-weight: 750; font-size: 1.05rem; }
.ag-range { color: var(--muted); font-size: 0.92rem; }
.ag-chev { font-size: 1.6rem; color: var(--muted); line-height: 1; }
.ag-trip { margin-bottom: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid #e9c98a; color: #6b4e10;
  background: repeating-linear-gradient(135deg, #fff3dc 0 8px, #fffaf0 8px 16px); }
.ag-trip-top { font-size: 1rem; }
.ag-trip-dates { margin-left: 8px; color: #8f7a52; font-size: 0.9rem; }
.ag-trip-bottom { display: flex; gap: 10px; align-items: center; margin-top: 4px; font-size: 0.9rem; color: #8f7a52; }
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .ag-trip { background: repeating-linear-gradient(135deg, #2e2615 0 8px, #241f13 8px 16px); border-color: #5a4720; color: #f1d9a4; }
html:not([data-theme="light"]) .ag-trip-dates, html:not([data-theme="light"]) .ag-trip-bottom { color: #c9b27f; }
}
html[data-theme="dark"] .ag-trip { background: repeating-linear-gradient(135deg, #2e2615 0 8px, #241f13 8px 16px); border-color: #5a4720; color: #f1d9a4; }
html[data-theme="dark"] .ag-trip-dates, html[data-theme="dark"] .ag-trip-bottom { color: #c9b27f; }

/* ---------- full-screen day view ---------- */
body.modal-open { overflow: hidden; }
.dayview { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; animation: dv-in .22s ease-out; }
.dayview.leaving { animation: dv-out .18s ease-in forwards; }
@keyframes dv-in { from { transform: translateX(6%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dv-out { to { transform: translateX(6%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dayview, .dayview.leaving { animation: none; } }
.dv-inner { max-width: 640px; margin: 0 auto; padding: 18px 20px 40px; }
.dv-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dv-back { font-size: 1rem; padding-left: 0; }
.dv-tz { font-size: 0.8rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 10px; }
.dv-title { font-size: 1.8rem; margin: 0; letter-spacing: -0.02em; }
.dv-sub { margin: 4px 0 22px; }
.dv-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dv-slot {
  font: inherit; font-size: 1.1rem; font-weight: 750; cursor: pointer; padding: 16px 12px; border-radius: 12px;
  border: 1.5px solid var(--accent); background: var(--card); color: var(--accent); transition: background .12s, color .12s;
}
.dv-slot:hover, .dv-slot:focus-visible { background: var(--accent); color: var(--accent-fg); }
.dv-ask { margin-top: 24px; }
.dv-ask .btn.ghost { padding: 0; }
@media (max-width: 760px) { .dv-slots { grid-template-columns: 1fr 1fr; } .dv-title { font-size: 1.5rem; } }

/* ---------- suggestions + month ---------- */
.suggest h2, .mv-title { font-size: 1.15rem; margin: 0 0 12px; }
.suggest-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.suggest-card {
  font: inherit; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); color: var(--fg);
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.suggest-card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }
.suggest-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.sc-day { color: var(--muted); font-size: 0.85rem; }
.sc-date { font-weight: 650; font-size: 1.05rem; }
.sc-time { margin-top: 6px; font-weight: 700; font-size: 1.25rem; color: var(--accent); }

.mv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mv-head .mv-title { margin: 0; }
.mv-nav { display: flex; gap: 6px; }
.mv-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.mv-dow { font-size: 0.75rem; color: var(--muted); text-align: center; padding: 6px 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--shade); }
.mv-day {
  position: relative; min-height: 86px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; background: var(--card);
}
.mv-day.out { background: var(--shade); }
.mv-day.out .mv-num { opacity: .35; }
.mv-day.past .mv-num { color: var(--muted); opacity: .6; }
.mv-day.open { cursor: pointer; }
.mv-day.open:hover { background: var(--accent-soft); }
.mv-day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.mv-day.today .mv-num { background: var(--fg); color: var(--card); border-radius: 999px; padding: 0 6px; }
.mv-num { font-size: 0.85rem; font-weight: 600; line-height: 1.6; }
.mv-day.away { background-image: repeating-linear-gradient(135deg, rgba(240,200,120,.22) 0 7px, transparent 7px 14px); background-color: #fffaf0; }
.mv-away { font-size: 0.72rem; font-weight: 700; color: #8a6418; white-space: nowrap; overflow: visible; position: relative; z-index: 1; }
.mv-first {
  font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; padding: 3px 8px; border-radius: 6px;
  border: 0; background: var(--accent); color: var(--accent-fg);
}
.mv-first:hover { background: var(--accent-hover); }
.mv-first.selected { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.mv-more { font: inherit; font-size: 0.75rem; color: var(--accent); background: none; border: 0; padding: 0 2px; cursor: pointer; font-weight: 600; }
.mv-more:hover { text-decoration: underline; }
.mv-dot { display: none; }
.day-panel { margin: 14px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.day-panel h3 { font-size: 1rem; margin: 0 0 10px; }
.day-panel .daylist-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mv-legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.mv-legend li { display: block; }
.mv-legend .sw { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.mv-legend .btn.ghost { padding: 0; font-size: inherit; }
.mv-legend .sw { width: 14px; height: 14px; border-radius: 3px; background-image: repeating-linear-gradient(135deg, rgba(240,200,120,.6) 0 3px, #fffaf0 3px 6px); border: 1px solid #e3b864; flex: none; }
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .mv-day.away { background-color: #241f13; }
html:not([data-theme="light"]) .mv-away { color: #e3b864; }
html:not([data-theme="light"]) .mv-legend .sw { background-image: repeating-linear-gradient(135deg, rgba(227,184,100,.5) 0 3px, #241f13 3px 6px); }
}
html[data-theme="dark"] .mv-day.away { background-color: #241f13; }
html[data-theme="dark"] .mv-away { color: #e3b864; }
html[data-theme="dark"] .mv-legend .sw { background-image: repeating-linear-gradient(135deg, rgba(227,184,100,.5) 0 3px, #241f13 3px 6px); }

/* ---------- travel ---------- */
.away-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #fff6e5; border: 1px solid #f0d9a8; color: #5c4210; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.away-banner p { margin: 2px 0; }
.wg-col.away { background-color: transparent; background-image: repeating-linear-gradient(135deg, rgba(240,200,120,.18) 0 8px, transparent 8px 16px), linear-gradient(to bottom, var(--line) 1px, transparent 1px); }
.wg-away { position: absolute; top: 6px; left: 4px; right: 4px; font-size: 0.7rem; font-weight: 650; color: #8a6418; text-align: center; line-height: 1.2; }
.wg-dayhead.away .wg-date { color: #b5862b; }
.mc-day.away { box-shadow: inset 0 0 0 1.5px #e3b864; }
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .away-banner { background: #2e2615; border-color: #5a4720; color: #f1d9a4; }
html:not([data-theme="light"]) .wg-away { color: #e3b864; }
}
html[data-theme="dark"] .away-banner { background: #2e2615; border-color: #5a4720; color: #f1d9a4; }
html[data-theme="dark"] .wg-away { color: #e3b864; }

/* ---------- ask ---------- */
.ask-cta { margin: 14px 0 0; color: var(--muted); }
.ask-cta .btn.ghost { padding: 0; }
.offer-list { display: grid; gap: 8px; margin: 12px 0; }
.offer-list .slot { text-align: left; padding: 12px 14px; }
.reply h2 { font-size: 1.05rem; margin: 18px 0 8px; }
.reply .times { display: grid; gap: 8px; margin-bottom: 12px; }
.reply label { font-weight: 600; display: block; margin-bottom: 4px; }
.draft { white-space: pre-wrap; background: var(--shade); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font: inherit; font-size: 0.9rem; }

.proposals-in { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 2px; margin: 14px 0; }
.proposals-in legend { font-weight: 600; padding: 0 4px; }
.proposals { display: grid; gap: 8px; margin: 8px 0 4px; }
.proposal { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .shell { padding: 0 0 32px; }
  .panel, .panel.single { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .top { align-items: flex-start; }
  .avatar { width: 40px; height: 40px; font-size: 0.9rem; }
  .top h1 { font-size: 1.25rem; }
  .top .meta { font-size: 0.85rem; }
  .weeks { display: none; }
  .agenda { display: block; }
  .agent-note { padding: 0 16px; }
  .top { padding: 18px 16px 0; }
  .panel.single .main { padding: 14px 16px 22px; }
  .wk-days { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .wd { min-height: 64px; padding: 5px 3px; align-items: center; text-align: center; }
  .wd-label { font-size: 0.68rem; }
  .wd-count { font-size: 0.78rem; }
  .wd-range { font-size: 0.62rem; line-height: 1.2; }
  .wd-none { display: none; }
  .ribbon { top: 6px; padding-top: 16px !important; font-size: 0.72rem; padding: 0 6px; gap: 4px; flex-wrap: wrap; white-space: normal; text-align: center; line-height: 1.25; }
  .rb-status { display: none; }
  .suggest-row { grid-template-columns: 1fr; gap: 8px; }
  .suggest .suggest-card { flex-direction: row; align-items: baseline; gap: 8px; padding: 12px 14px 12px 52px; }
  .sc-num { top: 50%; transform: translateY(-50%); width: 26px; height: 26px; left: 14px; }
  .sc-cta { display: none; }
  .sc-time { margin: 0 0 0 auto; font-size: 1.1rem; }
  .mv-day { min-height: 48px; padding: 4px; align-items: center; }
  .mv-first, .mv-more { display: none; }
  .mv-dot { display: block; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
  .mv-away { font-size: 0.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .mv-dow { font-size: 0.7rem; }
  .panel { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .main { padding: 18px 16px; }
  .facts { margin-bottom: 16px; }
}

/* "bad hour for Alexey" hint under proposed times */
.hour-hint:not(:empty) { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: #fff6e5; color: #6b4e10; font-size: 0.88rem; }
.hour-hint .btn.ghost { padding: 0; font-size: inherit; }
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .hour-hint:not(:empty) { background: #2e2615; color: #f1d9a4; }
}
html[data-theme="dark"] .hour-hint:not(:empty) { background: #2e2615; color: #f1d9a4; }

/* agent footer: one small link for humans */
.agent-note { margin: 18px auto 0; max-width: 980px; padding: 0 16px; text-align: center; }
.agent-link { font-size: 0.85rem; color: var(--muted); text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; display: inline-block; }
.agent-link:hover { color: var(--accent); border-color: var(--accent); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* timezone picker in the header's top-right */
.top { flex-wrap: wrap; }
.top .top-text { flex: 1 1 0; min-width: 0; }
.tz-slot { margin-left: auto; align-self: flex-start; }
.tz-slot:empty { display: none; }
.tz-slot .tz { margin: 4px 0 0; flex-wrap: nowrap; gap: 6px; font-size: 0.85rem; }
.tz-slot .tz select { max-width: 220px; padding: 5px 8px; font-size: 0.85rem; }
@media (max-width: 640px) {
  .tz-slot { margin-left: 0; flex-basis: 100%; }
  .tz-slot .tz select { max-width: 100%; flex: 1; }
}

/* ---------- alexeymk.com look ---------- */
.avatar { width: 56px; height: 56px; padding: 0; background: #f5f5f5; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 999px; }
.top h1 { font-weight: 800; font-size: 1.6rem; }
.panel { border-radius: 10px; border-color: var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.btn:not(.secondary):not(.ghost) { box-shadow: 0 2px 6px rgba(52,152,219,.25); }
@media (max-width: 640px) { .avatar { width: 48px; height: 48px; } .top h1 { font-size: 1.35rem; } }

/* day view: sticky "request an alternate time" footer */
.dv-foot { position: sticky; bottom: 0; margin: 28px -20px -40px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.dv-foot p { margin: 0; color: var(--muted); }
.wd.askable { cursor: pointer; }
.wd.askable .wd-none { transition: opacity .15s; }
.wd.askable:hover .wd-none, .wd.askable:focus-visible .wd-none { opacity: 0; }
.wd.askable .wd-ask { display: none; font-size: 0.78rem; color: var(--accent); font-weight: 600; }
.wd.askable:hover .wd-ask, .wd.askable:focus-visible .wd-ask { display: block; }
.credit { margin: 12px 0 0; font-size: 0.78rem; color: var(--muted); opacity: .8; }
.credit a { color: inherit; }
.credit a:hover { color: var(--accent); }

/* "Request another time" row with the agent link + credit on the right */
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 14px; }
.cta-row .ask-cta { margin: 0; }
.cta-extras { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.cta-extras .credit { margin: 0; }
footer.agent-note.moved .agent-link, footer.agent-note.moved .credit { display: none; }
@media (max-width: 640px) { .cta-extras { margin-left: 0; } }

/* Day labels sit inside the travel ribbon, so the stretch reads as one box per span */
.wd.away .wd-label { position: relative; z-index: 2; pointer-events: none; color: #8f7a52; }
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .wd.away .wd-label { color: #c9b27e; }
}
html[data-theme="dark"] .wd.away .wd-label { color: #c9b27e; }

/* light/dark override toggle (label names the mode you'd switch to) */
.theme-toggle { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.theme-toggle:hover { color: var(--accent); }
.theme-toggle .tt-light { display: none; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .theme-toggle .tt-dark { display: none; } html:not([data-theme="light"]) .theme-toggle .tt-light { display: inline; } }
html[data-theme="dark"] .theme-toggle .tt-dark { display: none; }
html[data-theme="dark"] .theme-toggle .tt-light { display: inline; }

/* top-right: timezone picker with the light/dark toggle under it */
.top-right { margin-left: auto; align-self: flex-start; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.top-right .tz-slot { margin-left: 0; }
.top-right .theme-toggle { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 640px) {
  .top-right { margin-left: 0; flex-basis: 100%; align-items: stretch; }
  .top-right .theme-toggle { align-self: flex-end; }
}

/* "Too far ahead": past the booking horizon. Neutral grey, so it doesn't read as a trip. */
html .wk .ribbon.future, html .agenda .ag-trip.future {
  background: repeating-linear-gradient(135deg, var(--shade) 0 8px, var(--card) 8px 16px);
  border: 1px dashed var(--line-strong); color: var(--muted);
}
html .wk .ribbon.future strong, html .agenda .ag-trip.future strong, html .wk .ribbon.future .rb-status { color: var(--muted); }
html .wd.away.future .wd-label { color: var(--muted); }

/* personality, kept quiet */
.quip { color: var(--muted); font-style: italic; }
.done .quip { margin-top: -6px; }
.rb-quip { flex-basis: 100%; font-size: 0.78rem; font-style: italic; color: var(--muted); text-align: center; }
html .wk .ribbon.future { flex-wrap: wrap; align-content: center; row-gap: 2px; }
.ag-quip { font-size: 0.8rem; font-style: italic; color: var(--muted); margin: 2px 0 4px; }

/* 3-4 day ribbons: drop the "Unavailable" word so label + action fit; never clip mid-word */
.ribbon.mid .rb-status { display: none; }
.ribbon.mid { flex-wrap: wrap; justify-content: center; align-content: center; row-gap: 2px; padding-left: 8px; padding-right: 8px; }
.ribbon > * { min-width: 0; }
.ribbon strong, .ribbon .rb-action { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* bottom of the picker: request link + agent button on one row, credit on its own line */
.cta-row .agent-link { margin-left: auto; }
.cta-wrap > .credit { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); text-align: right; }
@media (max-width: 640px) {
  .cta-row .agent-link { margin-left: 0; }
  .cta-wrap > .credit { text-align: left; }
}
/* Narrow ribbons wrap onto another line instead of cutting text off with "…" */
.ribbon.short strong, .ribbon.short .rb-action, .ribbon.mid strong, .ribbon.mid .rb-action { white-space: normal; overflow: visible; text-overflow: clip; text-align: center; line-height: 1.25; }
/* narrow phones: keep "Times in" on one line and the picker inside the gutter */
.tz-slot .tz label { white-space: nowrap; }
@media (max-width: 640px) {
  .top-right, .tz-slot, .tz-slot .tz { min-width: 0; max-width: 100%; }
  .tz-slot .tz { display: flex; width: 100%; }
  .tz-slot .tz select { min-width: 0; width: 100%; }
}
/* "too far out" card in the phone list: all grey, nothing in trip sand */
html .agenda .ag-trip.future .ag-trip-dates, html .agenda .ag-trip.future .ag-trip-bottom, html .agenda .ag-trip.future .ag-trip-bottom span { color: var(--muted); }

/* in-person (coffee) page */
.where-when { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; color: var(--fg); font-size: 0.92rem; }
.where-when strong { font-weight: 600; }
.zoom-fallback { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); }
.wd-place { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
/* taller headers (coffee page): keep the photo at the top, next to the title */
.top { align-items: flex-start; }
.top .avatar { margin-top: 2px; }
