@font-face { font-family: "Open Sans"; src: url(/fonts/open-sans-latin-wght-normal.woff2) format("woff2"); font-weight: 300 800; font-display: swap; }
:root {
  --bg: #fbfafb; --surface: #fff; --ink: #1c1a1e; --ink-2: #57525c; --line: #e3dfe6; --line-strong: #c9c3ce;
  --purple: #702082; --purple-deep: #5a1a69; --purple-tint: #f3ecf5;
  --warn: #9a3412; --warn-tint: #fdf3ea; --ok: #1d6b3a; --ok-tint: #edf6ef; --rest: #f1eff2;
  --r: 2px; --gap: 1.5rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 0.9375rem/1.5 "Open Sans", system-ui, sans-serif; accent-color: var(--purple); caret-color: var(--purple); }
::selection { background: var(--purple); color: #fff; }
a { color: var(--purple); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--purple-deep); }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 1.625rem; letter-spacing: -0.01em; }
h2 { font-size: 1.0625rem; margin-bottom: 0.75rem; }
h3 { font-size: 0.9375rem; margin: 1.5rem 0 0.5rem; }
h3 small, h2 small { font-weight: 400; color: var(--ink-2); margin-left: 0.5rem; }
p { margin: 0 0 0.75rem; max-width: 72ch; }
small { font-size: 0.8125rem; color: var(--ink-2); }
.muted { color: var(--ink-2); }
[hidden] { display: none !important; }

/* ---- frame ---- */
.top { display: flex; align-items: center; gap: 2rem; padding: 0 1.5rem; height: 3.5rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; gap: 0.45rem; align-items: baseline; text-decoration: none; color: var(--ink); font-size: 1.0625rem; white-space: nowrap; }
.brand strong { font-weight: 700; letter-spacing: 0.01em; } .brand span { color: var(--purple); font-weight: 600; }
.top nav { display: flex; gap: 0.25rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.top nav a { padding: 1.05rem 0.7rem 0.95rem; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.875rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.top nav a:hover { color: var(--ink); } .top nav a.on { color: var(--purple); border-bottom-color: var(--purple); }
.demo { margin: 0; max-width: none; padding: 0.35rem 1.5rem; background: var(--ink); color: #eee9f0; font-size: 0.8125rem; }
main > h1 { margin-bottom: 1.25rem; }
main { max-width: 60rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; } main.wide { max-width: 84rem; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.head p { margin: 0.25rem 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem 1.5rem; margin-bottom: var(--gap); }
.card.narrow { max-width: 26rem; margin-inline: auto; }
.card.narrow h1 { margin-bottom: 1rem; }
.cards, .cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
.cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.back { display: inline-flex; align-items: center; gap: 0.25rem; text-decoration: none; font-weight: 600; font-size: 0.875rem; }
.chev { display: block; }

/* ---- the demo's front door ---- */
.door { max-width: 52rem; margin: 3rem auto 0; } .door h1 { font-size: 2rem; margin-bottom: 0.5rem; } .door > p { margin-bottom: 1.5rem; }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.doors button { display: flex; flex-direction: column; gap: 0.5rem; text-align: left; padding: 1.25rem 1.25rem 1.5rem; min-height: 11rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.doors b { font-size: 1.25rem; font-weight: 600; color: var(--purple); } .doors span { color: var(--ink-2); }
.doors button:hover { background: var(--purple); border-color: var(--purple); } .doors button:hover b, .doors button:hover span { color: #fff; }

/* ---- lists of facts and rows ---- */
.facts { list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums; }
.facts li { display: flex; justify-content: space-between; gap: 1.5rem; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.facts li:first-child { border-top: 0; }
.facts span { color: var(--ink-2); } .facts b { font-weight: 600; text-align: right; }
.facts .lead { padding-bottom: 0.7rem; } .facts .lead span { color: var(--ink); font-weight: 600; } .facts .lead b { font-size: 1.375rem; line-height: 1.2; color: var(--purple); }
.facts .warn b, .warn { color: var(--warn); } td.warn { font-weight: 600; }
.ok { color: var(--ok); }
.row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); max-width: none; margin: 0; }
.row:first-of-type { border-top: 0; } a.row:hover b { color: var(--purple); }
.row .grow { flex: 1; min-width: 0; } .row b { font-weight: 600; } .row small { display: block; }
.dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; flex: none; }
.pill { font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: var(--r); background: var(--rest); color: var(--ink-2); white-space: nowrap; }
.pill.approved { background: var(--ok-tint); color: var(--ok); } .pill.denied { background: var(--warn-tint); color: var(--warn); }
.pill.pending, .pill.asked, .pill.suggested { background: var(--purple-tint); color: var(--purple-deep); }
.flags { margin: 0; padding: 0; list-style: none; } .flags li { padding: 0.5rem 0; border-top: 1px solid var(--line); } .flags li:first-child { border-top: 0; }
.flags a { color: var(--ink); text-decoration: none; } .flags a:hover { color: var(--purple); text-decoration: underline; }
.banner { display: block; background: var(--purple-tint); border: 1px solid #dcc9e2; border-radius: var(--r); padding: 0.75rem 1rem; margin-bottom: var(--gap); color: var(--purple-deep); font-weight: 600; text-decoration: none; }
.banner.block { margin: 1.25rem 0 0; font-weight: 400; color: var(--ink); } .banner.block p { margin: 0.35rem 0 0.75rem; }
.note { background: var(--warn-tint); border: 1px solid #f0d9c4; border-radius: var(--r); padding: 0.6rem 0.8rem; color: var(--warn); }

/* ---- forms ---- */
.stack > * + * { margin-top: 1rem; } .stack h3 { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); } .stack h3:first-child { margin-top: 0; padding-top: 0; border: 0; }
.field { display: flex; flex-direction: column; gap: 0.3rem; } .field > span { font-weight: 600; font-size: 0.875rem; }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox], [type=radio], [type=color], [type=file]), select, textarea { width: 100%; padding: 0.5rem 0.65rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); min-height: 2.5rem; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input::placeholder { color: #6f6a75; }
input[type=color] { width: 2.25rem; height: 2.25rem; padding: 0.15rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); flex: none; }
.two, .three { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; } .three { grid-template-columns: repeat(3, 1fr); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.5rem; padding: 0.45rem 1.1rem; background: var(--purple); color: #fff; border: 1px solid var(--purple); border-radius: var(--r); font-weight: 600; font-size: 0.875rem; text-decoration: none; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.btn:hover { background: var(--purple-deep); border-color: var(--purple-deep); color: #fff; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); } .btn.ghost:hover { border-color: var(--purple); color: var(--purple); background: var(--surface); }
.btn.danger { background: var(--surface); color: var(--warn); border-color: #e2b99a; } .btn.danger:hover { background: var(--warn); border-color: var(--warn); color: #fff; }
button.link { background: none; border: 0; padding: 0; color: var(--purple); text-decoration: underline; cursor: pointer; font-size: 0.8125rem; }
.inline { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; } .inline select, .inline input:not([type=checkbox], [type=color]) { width: auto; flex: 1 1 9rem; }
.checks { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; margin-top: 1rem; } .checks label { display: flex; gap: 0.5rem; align-items: baseline; }
.choice { border: 0; padding: 0; margin-inline: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; } .choice legend { font-weight: 600; font-size: 0.875rem; padding: 0; margin-bottom: 0.4rem; }
.choice label { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 0.9rem; border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; }
.choice label:has(:checked) { border-color: var(--purple); background: var(--purple-tint); } .choice input { margin-top: 0.3rem; } .choice small { display: block; }
details { margin-top: 1rem; } summary { cursor: pointer; color: var(--purple); font-weight: 600; } details > form { margin-top: 1rem; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.chip { text-align: left; padding: 0.5rem 0.7rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; font-weight: 600; } .chip small { display: block; font-weight: 400; } .chip:hover { border-color: var(--purple); color: var(--purple); }
.typeline { padding: 0.5rem 0; border-top: 1px solid var(--line); } .typeline:first-of-type { border-top: 0; } .typeline small { flex: 1 1 100%; order: 5; }
.filters { margin-bottom: 1rem; } .filters select { flex: 0 1 14rem; }
.preview { border-top: 1px solid var(--line); padding-top: 1rem; } .preview .sum { font-size: 1.0625rem; }

/* ---- date range picker ---- */
.dp { position: relative; margin-top: 0.5rem; user-select: none; max-width: 41rem; }
.dp-months { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.dp-m h5 { margin: 0.35rem 0 0.75rem; text-align: center; font-size: 0.9375rem; font-weight: 600; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.dp-grid .dow { font-size: 0.75rem; font-weight: 600; color: var(--ink-2); text-align: center; padding-bottom: 0.35rem; }
.dp-d { height: 2.5rem; border: 0; background: none; font-size: 0.875rem; font-weight: 600; cursor: pointer; border-radius: var(--r); font-variant-numeric: tabular-nums; }
.dp-d.rest { color: #77717d; font-weight: 400; background: var(--rest); border-radius: 0; }
.dp-d:hover { box-shadow: inset 0 0 0 1.5px var(--purple); }
.dp-d.in-range { background: var(--purple-tint); border-radius: 0; color: var(--purple-deep); }
.dp-d.start, .dp-d.end { background: var(--purple); color: #fff; font-weight: 700; }
.dp-d.today:not(.start, .end) { box-shadow: inset 0 -2px 0 var(--purple); }
.dp-nav { position: absolute; top: 0; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: var(--r); cursor: pointer; color: var(--ink); }
.dp-nav:hover { border-color: var(--line-strong); color: var(--purple); } .dp-nav.prev { left: 0; } .dp-nav.next { right: 0; }

/* ---- the people-by-days table ---- */
.gridwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.card .gridwrap { margin-top: 0.75rem; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.grid th, .grid td { border-left: 1px solid var(--line); border-top: 1px solid var(--line); padding: 0; }
.grid thead th { border-top: 0; font-size: 0.75rem; font-weight: 600; text-align: center; min-width: 1.75rem; padding: 0.35rem 0; line-height: 1.2; }
.grid thead th small { display: block; font-size: 0.6875rem; font-weight: 400; }
.grid thead th.today { background: var(--purple); color: #fff; } .grid thead th.today small { color: #fff; }
.grid .who { position: sticky; left: 0; z-index: 1; background: var(--surface); border-left: 0; text-align: left; padding: 0.4rem 0.9rem; white-space: nowrap; font-weight: 600; font-size: 0.875rem; min-width: 11rem; box-shadow: 1px 0 0 var(--line); }
.grid .who a { color: var(--ink); text-decoration: none; } .grid .who a:hover { color: var(--purple); } .grid .who small { display: block; font-weight: 400; }
.grid td { height: 2.5rem; position: relative; } .grid .rest { background: var(--rest); }
.grid td.off::before { content: ""; position: absolute; inset: 0.4rem 0; background: var(--c); }
.grid td.off.half::before { inset: 0.4rem 0 50%; }
.grid td.off.pend::before { background: repeating-linear-gradient(135deg, var(--c) 0 3px, color-mix(in srgb, var(--c) 22%, #fff) 3px 6px); }
.grid td.ask { background: var(--purple-tint); box-shadow: inset 0 2px 0 var(--purple), inset 0 -2px 0 var(--purple); }
.grid td a { position: absolute; inset: 0; }
.grid tr.asking .who { color: var(--purple); }
.list th, .list td { text-align: left; padding: 0.6rem 0.9rem; border-top: 1px solid var(--line); vertical-align: top; } .list thead th { border-top: 0; font-size: 0.8125rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.list .r { text-align: right; } .list td small { display: block; } .list td a { font-weight: 600; text-decoration: none; } .list tr.gone { color: var(--ink-2); }
.legend { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 0.9rem; font-size: 0.8125rem; color: var(--ink-2); max-width: none; }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; } .legend i { width: 1rem; height: 0.7rem; display: block; }
.legend i.pend { background: repeating-linear-gradient(135deg, var(--ink-2) 0 3px, #e6e3e8 3px 6px); }
.around h3 { margin-top: 0; }

/* ---- month calendar ---- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.cal .dowh { padding: 0.5rem 0.6rem; font-size: 0.75rem; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 7rem; padding: 0.4rem 0.4rem 0.5rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal .day:nth-child(7n + 1) { border-left: 0; } .cal .day.rest { background: var(--rest); }
.cal .num { font-size: 0.8125rem; font-weight: 600; align-self: flex-start; padding: 0 0.3rem; } .cal .today .num { background: var(--purple); color: #fff; border-radius: var(--r); }
.cal .hol { color: var(--ink-2); font-size: 0.75rem; }
.tag { display: block; padding: 0.1rem 0.4rem; font-size: 0.75rem; font-weight: 600; line-height: 1.45; color: var(--ink); background: color-mix(in srgb, var(--c) 16%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, #fff); border-radius: var(--r); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag.pend { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, #fff) 0 4px, #fff 4px 8px); }
a.tag:hover { color: var(--purple-deep); box-shadow: inset 0 0 0 1px var(--c); }

@media (max-width: 760px) {
  main { padding: 1.25rem 1rem 3rem; } .top { padding: 0 1rem; gap: 1rem; } .demo { padding-inline: 1rem; }
  .cards, .cols, .two, .three, .choice, .doors { grid-template-columns: 1fr; } .doors button { min-height: 0; } .door { margin-top: 1rem; }
  .card { padding: 1rem; }
  .dp-months { grid-template-columns: 1fr; } .dp-m + .dp-m { display: none; }
  .cal .day { min-height: 4.5rem; padding: 0.25rem; } .tag { font-size: 0.6875rem; padding: 0 0.2rem; } .cal .hol { display: none; }
  .grid .who { min-width: 7.5rem; padding-inline: 0.6rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
