/* Nexus Availability: styles follow the nexushealthstrategies.com palette and type. */
:root {
  color-scheme: light;
  --bg: #f9f9f7;
  --card: #ffffff;
  --mint: #e8f1e9;
  --mint-light: #eef5ef;
  --sky: #96b6d1;
  --sky-pale: #d9e4eb;
  --sky-deep: #45759e;
  --green: #004643;
  --green-dark: #00332f;
  --sage: #abd1c6;
  --teal: #316559;
  --coral: #d9704c;
  --coral-ink: #ac4725;
  --butter: #e0b556;
  --ink: #25322d;
  --text: #333333;
  --muted: #5d6b66;
  --line: rgba(37, 50, 45, 0.16);
  --line-strong: rgba(37, 50, 45, 0.3);
  --busy: #dedbd2;
  --busy-edge: #8a877f;
  --ok: #2f6b3a;
  --warn: #8a5a00;
  --error: #a3332a;
  --serif: "Cambria", "Caladea", Georgia, serif;
  --sans: "Calibri", "Carlito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 700; margin: 0; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0; }
a { color: var(--sky-deep); }
button, input, select { font: inherit; color: inherit; }
.boot { padding: 40px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--green); background: transparent; color: var(--green); font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--mint-light); }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); }
.btn.quiet { border-color: var(--line-strong); color: var(--ink); font-weight: 400; }
.btn.small { min-height: 30px; padding: 3px 11px; font-size: 14px; }
.btn.danger { border-color: var(--error); color: var(--error); }
.btn[aria-pressed="true"] { background: var(--green); color: #fff; }
.link { background: none; border: 0; padding: 0; color: var(--sky-deep); text-decoration: underline; cursor: pointer; }
input[type="text"], input[type="url"], input[type="search"], select {
  min-height: 38px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; width: 100%; }
select { width: auto; }
label.field { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
label.field > span { font-weight: 700; color: var(--ink); }
.hint { font-size: 14px; color: var(--muted); }
.err { font-size: 14px; color: var(--error); }

/* layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.banner { background: var(--butter); color: #32240b; font-size: 14px; }
.banner .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.banner .link { color: #32240b; }
header.top { background: #fff; border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { height: 40px; width: auto; }
.brand span { font-family: var(--serif); font-size: 18px; border-left: 1px solid var(--line-strong); padding-left: 12px; }
nav.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
nav.tabs a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 700; }
nav.tabs a:hover { background: var(--mint-light); }
nav.tabs a[aria-current="page"] { background: var(--green); color: #fff; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--sage); color: var(--green); display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
main { padding: 28px 0 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } .brand span { display: none; } }

/* sign-in */
.signin { max-width: 760px; margin: 40px auto; }
.signin .logo { height: 72px; margin-bottom: 18px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 18px; }
.person-btn { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; cursor: pointer; }
.person-btn:hover { border-color: var(--green); background: var(--mint-light); }
.person-btn small { display: block; color: var(--muted); font-size: 13px; }

/* calendars list */
.cal-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cal-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 16px; }
.cal-row + .cal-row, .cal-edit + .cal-row, .cal-row + .cal-edit { border-top: 1px solid var(--line); }
.swatch { width: 14px; height: 14px; border-radius: 50%; }
.cal-name { font-weight: 700; color: var(--ink); }
.cal-meta { font-size: 14px; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.pill.req { background: var(--mint); color: var(--teal); }
.pill.sample { background: var(--sky-pale); color: var(--sky-deep); }
.status-ok { color: var(--ok); }
.status-error { color: var(--error); }
.status-loading { color: var(--muted); }
.cal-edit { padding: 16px; background: var(--mint-light); display: grid; gap: 12px; }
.colors { display: flex; gap: 8px; }
.colors button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.colors button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: var(--green); color: #fff; }
details.help { border-top: 1px solid var(--line); padding-top: 14px; }
details.help summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details.help ol { margin: 8px 0 0; padding-left: 20px; font-size: 15px; }
details.help li { margin-bottom: 4px; }

/* people chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-size: 14px; }
.chip .avatar { width: 24px; height: 24px; font-size: 11px; }
.chip:hover { border-color: var(--green); }
.chip[data-state="on"], .chip[data-state="required"] { background: var(--green); border-color: var(--green); color: #fff; }
.chip[data-state="on"] .avatar, .chip[data-state="required"] .avatar { background: #fff; }
.chip[data-state="optional"] { background: var(--sky-pale); border-color: var(--sky-deep); color: var(--ink); border-style: dashed; }
.chip .tag { font-size: 11px; font-weight: 700; text-transform: lowercase; opacity: 0.9; }

/* timeline */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }
.toolbar .date { font-family: var(--serif); font-size: 20px; color: var(--ink); min-width: 210px; }
.scroller { overflow-x: auto; }
.tl { min-width: 720px; }
.tl-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: stretch; border-top: 1px solid var(--line); }
.tl-row.sub { background: var(--mint-light); }
.tl-row.sub .tl-label { padding-left: 34px; font-size: 13px; }
.tl-row.free { border-top: 2px solid var(--green); }
.tl-label { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 0; min-width: 0; font-size: 14px; }
.tl-label .name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-label small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.tl-label button.expand { border: 0; background: none; cursor: pointer; padding: 2px; color: var(--muted); font-size: 12px; width: 18px; }
.tl-days { display: grid; gap: 6px; }
.lane { position: relative; height: 44px; background: #fff; }
.tl-row.sub .lane { height: 30px; background: transparent; }
.lane .off { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, #efede6 0 4px, #f6f5f0 4px 8px); }
.lane .tick { position: absolute; top: 0; bottom: 0; border-left: 1px dashed rgba(37, 50, 45, 0.1); }
.lane .now { position: absolute; top: -2px; bottom: -2px; border-left: 2px solid var(--coral); z-index: 3; }
.blk { position: absolute; top: 5px; bottom: 5px; border-radius: 5px; padding: 2px 6px; font-size: 12px; line-height: 1.25;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-left: 3px solid; color: var(--ink); z-index: 2; cursor: default; }
.blk.busy { background: var(--busy); border-color: var(--busy-edge); color: #444; }
.blk.tent { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.65) 0 4px, transparent 4px 8px); }
.blk.allday { top: 3px; bottom: 3px; }
.blk.free { background: #cfe6c4; border-color: #4e8a3a; color: #1e4a14; cursor: pointer; }
.blk.free:hover { background: #bcdcae; }
.tl-sub .blk { top: 4px; bottom: 4px; font-size: 11px; }
.tl-head { display: grid; grid-template-columns: 190px minmax(0, 1fr); font-size: 12px; color: var(--muted); }
.tl-head .hours { position: relative; height: 20px; }
.tl-head .hours span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-head .dayname { font-weight: 700; color: var(--ink); font-size: 13px; padding-bottom: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 14px; }
.legend i { display: inline-block; width: 14px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; border-left: 3px solid; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* find a time */
.find { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .find { grid-template-columns: minmax(0, 1fr); } }
.find h3 { margin-bottom: 8px; }
.slot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.slot.best { border: 2px solid var(--green); }
.slot .when { font-weight: 700; color: var(--ink); font-size: 17px; }
.slot .local { font-size: 13px; color: var(--muted); }
.slot .att { font-size: 14px; margin-top: 2px; }
.slot .att.good { color: var(--ok); }
.slot .att.partial { color: var(--warn); }
.slot .att.bad { color: var(--error); }
.slot .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 50; }
@media (max-width: 640px) {
  .cal-row { grid-template-columns: 14px minmax(0, 1fr); }
  .cal-row > :nth-child(n+3) { grid-column: 2; }
  .slot { grid-template-columns: minmax(0, 1fr); }
  .slot .actions { justify-content: flex-start; }
  .who .who-name { display: none; }
}
