:root {
  /* Agenteach Attend design language — matched to the live product (demo.agentea.ch). */
  --ink: #23262c;
  --ink-soft: #454b55;
  --muted: #5c6068;
  --line: #e2e1de;
  --bg: #fbf9f6;            /* paper */
  --card: #ffffff;
  --accent: #004aad;       /* brand blue */
  --accent-dark: #003a86;  /* brand ink */
  --accent-soft: #e7f0fb;  /* brand soft */
  --focus: #2f6bd6;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 34, 60, 0.06), 0 10px 30px rgba(0, 74, 173, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 16px 56px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
@media (max-width: 480px) { .card { padding: 20px; } .shell { padding-top: 20px; } }

.brand {
  display: flex; align-items: center;
}
.brand-lockup {
  display: block; height: 52px; width: auto; max-width: 100%;
}
@media (max-width: 480px) { .brand-lockup { height: 46px; } }
.head h1 { font-size: 25px; margin: 18px 0 6px; letter-spacing: -0.02em; font-weight: 800; }
.muted { color: var(--muted); margin: 0; }
.meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-soft);
}
.meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Meeting-length segmented control */
.durations { margin-top: 16px; }
.durations-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.seg {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
}
.seg-opt {
  padding: 9px 6px; border: none; border-radius: 9px; background: transparent;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; transition: all 0.1s; white-space: nowrap;
}
.seg-opt:hover { color: var(--accent-dark); background: var(--accent-soft); }
.seg-opt.active { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0, 58, 134, 0.25); }
.seg-opt:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.step { margin-top: 22px; }
.loading, .empty { color: var(--muted); padding: 24px 0; text-align: center; }

.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; }
.day-pill {
  flex: 1 1 0; padding: 10px 6px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 54px;
}
.day-pill .dow { font-weight: 600; color: var(--ink); }
.day-pill:hover { border-color: var(--accent); }
.day-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.day-pill.active .dow { color: #fff; }

.slots-head { font-weight: 600; margin-bottom: 12px; font-size: 15px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.slot {
  padding: 11px 8px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--ink); text-align: center; transition: all 0.1s;
}
.slot:hover { border-color: var(--accent); background: var(--accent-soft); }

.back {
  background: none; border: none; color: var(--accent-dark); cursor: pointer;
  font-size: 14px; font-weight: 500; padding: 0; margin-bottom: 14px;
}
.chosen {
  background: var(--accent-soft); border-radius: 10px; padding: 12px 14px;
  font-weight: 600; font-size: 15px; color: var(--accent-dark); margin-bottom: 20px;
}

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 13px; margin: -2px 0 8px; }
input, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; color: var(--ink); background: #fff;
}
input:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: var(--focus); }
textarea { resize: vertical; }

.guest-row { display: flex; gap: 8px; margin-bottom: 8px; }
.guest-row input { flex: 1; }
.guest-remove {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  width: 42px; cursor: pointer; color: var(--muted); font-size: 18px;
}
.guest-remove:hover { border-color: #d66; color: #c33; }
.link-btn { background: none; border: none; color: var(--accent-dark); font-weight: 600; cursor: pointer; padding: 2px 0; font-size: 14px; }

.primary {
  width: 100%; padding: 13px; border: none; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px;
  cursor: pointer; margin-top: 4px;
}
.primary:hover { background: var(--accent-dark); }
.primary:disabled { opacity: 0.6; cursor: default; }

.form-error {
  background: #fdeceb; border: 1px solid #f3c4c0; color: #a3271f;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 14px;
}

.done { text-align: center; }
.check {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 28px; display: flex; align-items: center;
  justify-content: center; margin: 8px auto 14px;
}
.done h2 { margin: 0 0 8px; }
.done-detail { text-align: left; background: var(--bg); border-radius: 10px; padding: 16px; font-size: 14px; }
.done-detail .row { display: flex; gap: 8px; padding: 5px 0; }
.done-detail .k { color: var(--muted); min-width: 92px; }
.done-detail a { color: var(--accent-dark); font-weight: 600; }

.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* "See more days" + month date picker */
.more-days {
  display: inline-flex; align-items: center; gap: 6px;
  margin: -6px 0 16px; padding: 6px 0; font-size: 14px;
}
.more-days:hover { text-decoration: underline; }
.more-days:focus-visible, .cal-nav-btn:focus-visible, .picker-close:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px;
}
.picker { margin: 0 0 18px; }
.picker-panel {
  border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 14px 14px 12px;
}
.picker-backdrop { display: none; }
.picker-sheet-head { display: none; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-month { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.cal-nav-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--accent-dark); font: inherit; font-size: 18px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.cal-nav-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.cal-nav-btn:disabled { color: #c3c6cc; cursor: default; }
.cal { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.cal th {
  font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 0 4px; text-align: center;
}
.cal td { padding: 0; text-align: center; }
.cal-day {
  width: 100%; aspect-ratio: 1 / 1; max-height: 48px; min-height: 38px;
  border-radius: 10px; border: 1px solid transparent; background: transparent;
  font: inherit; font-size: 14px; font-weight: 500; color: #a9adb4;
  cursor: default; position: relative; padding: 0;
}
.cal-day.available {
  background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; cursor: pointer;
}
.cal-day.available::after {
  content: ''; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px;
  margin-left: -2px; border-radius: 50%; background: var(--accent);
}
.cal-day.available:hover { border-color: var(--accent); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--ink-soft); }
.cal-day.today.available { box-shadow: inset 0 0 0 2px var(--accent-dark); }
.cal-day.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.cal-day.selected::after { background: #fff; }
.cal-day.loading { color: #c9ccd1; }
.cal-day:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.cal-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin: 8px 2px 0; font-size: 12.5px; color: var(--muted);
}
.cal-legend .swatch {
  display: inline-block; width: 12px; height: 12px; border-radius: 4px;
  background: var(--accent-soft); border: 1px solid #c9dbf3; vertical-align: -1px; margin-right: 5px;
}
.cal-legend .swatch.today { background: #fff; border: 2px solid var(--ink-soft); }
.cal-status { font-size: 13px; color: var(--muted); margin: 6px 2px 0; min-height: 0; }
.cal-status:empty { display: none; }
.slots-empty { grid-column: 1 / -1; color: var(--muted); font-size: 14px; padding: 6px 0 4px; margin: 0; }
.slots-head:focus { outline: none; }

/* Phone: the picker becomes a full-width bottom sheet. */
@media (max-width: 600px) {
  .picker { margin: 0; }
  .picker-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(20, 30, 50, 0.38); z-index: 40;
  }
  .picker-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
    border-radius: 18px 18px 0 0; border: none; border-top: 1px solid var(--line);
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    max-height: 92vh; overflow-y: auto; box-shadow: 0 -10px 30px rgba(20, 34, 60, 0.18);
  }
  .picker-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 2px 0 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
  }
  .picker-sheet-head strong { font-size: 16px; }
  .picker-len { font-weight: 500; color: var(--muted); }
  .picker-close {
    width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1;
  }
  .cal { border-spacing: 3px; }
  .cal-day { min-height: 42px; }
  body.sheet-open { overflow: hidden; }
}
