/* re:Seat web app. One file, system fonts, no network, so it works offline in a hotel. */
:root {
  --ground: #f4f3ee; --ink: #1b1b1f; --ink-2: #4a4944; --muted: #6b6a64; --line: #dad8cf; --line-2: #eceae3;
  --surface: #ffffff; --accent: #b8461a; --accent-soft: #fbe9df; --accent-ink: #8a3a12;
  --wanted: #2458a8; --leave: #e0a100; --good: #2e7d32; --warn: #8a6d00; --bad: #8a1c1c;
  --bar: #1b1b1f; --bar-ink: #f4f3ee; --bar-muted: #cfcdc4; --held: #1b1b1f; --badge: #8a1c1c; --on-leave: #1b1b1f;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #15161a; --ink: #ecebe6; --ink-2: #c3c1b9; --muted: #9a988f; --line: #33343a; --line-2: #26272c;
    --surface: #1d1e23; --accent: #b9551f; --accent-soft: #3a2418; --accent-ink: #f0a982;
    --wanted: #7fa8ea; --leave: #e3ac1c; --good: #6fc173; --warn: #e2c25a; --bad: #ef7d7d;
    --bar: #0d0e11; --bar-ink: #ecebe6; --bar-muted: #a9a79f; --held: #3b3d46; --badge: #a8322f; --on-leave: #15161a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 14px/1.4 var(--sans); padding-bottom: env(safe-area-inset-bottom, 0px); }
a { color: var(--wanted); }
button { font: inherit; cursor: pointer; border-radius: 6px; padding: 10px 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 44px; }
button.primary { border: 0; background: var(--accent); color: #fff; font-weight: 600; flex: 1 1 auto; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--wanted); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.fine { font-size: 12px; color: var(--muted); }
.center { text-align: center; }
.grow { flex: 1 1 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.empty { color: var(--muted); }

.demo { background: var(--leave); color: var(--on-leave); font-weight: 600; text-align: center; padding: 6px 16px; }

/* status bar */
.top { display: flex; align-items: center; gap: 12px 20px; padding: 14px 28px; background: var(--bar); color: var(--bar-ink); flex-wrap: wrap; }
.brand { font-size: 20px; font-weight: 600; color: var(--bar-ink); text-decoration: none; letter-spacing: -0.01em; }
.status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--bar-muted); }
.status b { font-weight: 400; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #6cc26b; display: inline-block; flex: 0 0 auto; }
[data-state="paused"] .dot { background: var(--leave); }
[data-state="offline"] .dot, [data-state="signin"] .dot { background: #e0605a; }
.counts { font-family: var(--mono); font-size: 13px; color: var(--bar-muted); }

/* dashboard */
.layout { display: flex; flex-wrap: wrap; gap: 24px; padding: 24px 28px; }
.side { flex: 1 1 320px; max-width: 380px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.count { font-family: var(--mono); font-size: 12px; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card p { color: var(--ink-2); }
.kind { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 500; }
.kind.ok { color: var(--good); }
.checks { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.checks li { display: flex; gap: 8px; }
.checks li > span:first-child { font-weight: 600; width: 1em; flex: 0 0 auto; }
.c-yes > span:first-child { color: var(--good); }
.c-no > span:first-child { color: var(--bad); }
.c-ask > span:first-child { color: var(--warn); }
.actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.result { font-size: 13px; font-weight: 600; }
.result:empty { display: none; }
.list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.journal .t { color: var(--muted); }
.journal .o { color: var(--ink-2); }
.journal .o-verified, .journal .o-success { color: var(--good); }
.journal .o-failed, .journal .o-error, .journal .o-closed { color: var(--bad); }
.journal .o-proposed, .journal .o-checked, .journal .o-rolled_back { color: var(--accent); }

.kept { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.kept-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kept-row b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.kept-row span { font-size: 12px; color: var(--muted); }

[hidden] { display: none !important; }
/* pages: activity, demo */
.page { max-width: 980px; margin: 0 auto; padding: 24px 28px 96px; display: flex; flex-direction: column; gap: 16px; }
.demo-page { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 24px; padding: 24px 28px 96px; align-items: start; }
.scenarios { display: flex; flex-direction: column; gap: 8px; }
.scenarios .tour { flex: 0 0 auto; align-self: flex-start; }
.scenarios h3 { margin-top: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sc-list li { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.sc-list li > div { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-list li span { font-size: 12px; color: var(--ink-2); }
.sc-list button { flex: 0 0 auto; min-height: 34px; padding: 4px 14px; }
.outcome { position: sticky; top: 60px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.outcome h2 { font-size: 18px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step > i { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.step h3 { font-size: 14px; margin: 3px 0 0; }
.step p { margin: 0; color: var(--ink-2); }
.ba { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.ba h4 { margin: 0 0 6px; font-size: 13px; }
.ba-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ba h5 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.rows li { padding: 4px 6px; border-radius: 4px; background: var(--line-2); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.rows .r-proposed { background: var(--accent-soft); }
.rows .r-gone { text-decoration: line-through; opacity: .7; background: transparent; border: 1px dashed var(--line); }
.notif { background: var(--line-2); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; max-width: 360px; }
.notif .na { font-size: 11px; color: var(--muted); }
.notif p { font-size: 13px; }
.nb { display: flex; gap: 8px; margin-top: 6px; }
.nb span { flex: 1; text-align: center; padding: 6px; border-radius: 8px; background: var(--surface); font-weight: 600; font-size: 13px; }
/* targets, status, day */
.links { display: flex; gap: 14px; margin-right: 18px; }
.links a { color: var(--bar-ink); text-decoration: none; font-size: 13px; }
.links a:hover { text-decoration: underline; }
a.dh { color: inherit; text-decoration: none; display: block; }
a.dh:hover { text-decoration: underline; color: var(--accent); }
.target .band { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.rows .r-held { background: var(--held); color: #fff; }
.rows .r-held span, .rows .r-held .band { color: #ddd; }
.t-held { border-left: 4px solid var(--good); }
.t-proposed { border-left: 4px solid var(--accent); }
.t-waiting { border-left: 4px solid var(--wanted); }
.facts { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.quota { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.quota li { position: relative; padding: 4px 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.quota li i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--good); opacity: .18; }
.daytabs { display: flex; gap: 6px; flex-wrap: wrap; }
.daytabs a { padding: 6px 12px; border-radius: 16px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--surface); }
.daytabs a[aria-current] { background: var(--ink); color: var(--ground); }
.leave-row { margin: 0; padding: 6px 10px; border-left: 4px solid var(--leave); background: var(--surface); font-weight: 600; }
.d-held { border-left: 4px solid var(--held); }
.d-proposed { border-left: 4px solid var(--accent); }
.d-wanted { border-left: 4px dashed var(--wanted); }
.d-ghost { opacity: .7; border-left: 4px dashed var(--muted); }
@media (max-width: 600px) { .links { margin-right: 0; gap: 10px; } }
/* what changed */
.mk { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 5px; border-radius: 3px; color: #fff; background: var(--good); white-space: nowrap; }
.mk-released, .mk-removed { background: var(--muted); }
.mk-moved { background: var(--wanted); }
.mk-proposed { background: var(--accent); }
.blk .mk { align-self: flex-start; margin-bottom: 2px; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
.changed li { display: block; line-height: 1.5; }
.changed .mk { margin-right: 6px; vertical-align: 1px; }
.changed .t { margin-right: 6px; }
.b-ghost { border: 2px dashed var(--muted); color: var(--muted); background: transparent; }
.b-ghost b, .b-ghost .tm, .b-ghost .nm { text-decoration: line-through; }
.lg-ghost i { border: 2px dashed var(--muted); }
.now { position: absolute; left: -4px; right: 0; height: 0; border-top: 2px solid var(--bad); z-index: 3; pointer-events: none; }
.now span { position: absolute; right: 2px; top: -16px; font-size: 10px; font-weight: 700; color: var(--bad); background: var(--surface); padding: 0 3px; border-radius: 3px; }
@media (max-width: 860px) {
  .demo-page { grid-template-columns: 1fr; padding: 16px 16px 96px; }
  .demo-page .outcome { position: static; order: -1; }
  .page { padding: 16px 16px 96px; }
  .ba-cols { grid-template-columns: 1fr; }
}

/* week grid */
.weekhead { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.lg { display: flex; align-items: center; gap: 6px; }
.lg i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-held i { background: var(--held); }
.lg-wanted i { border: 2px dashed var(--wanted); }
.lg-proposed i { background: var(--accent); }
.lg-leave i { height: 4px; background: var(--leave); border-radius: 2px; }
.lg-fallback i { background: var(--line-2); border: 1px solid var(--line); }
.scroll { overflow-x: auto; }
.week { display: grid; grid-template-columns: 52px repeat(5, minmax(150px, 1fr)); gap: 0 6px; min-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; font-size: 12px; }
.dh { height: 28px; font-weight: 600; }
.slots { position: relative; height: 1040px; }
.col .slots { background: repeating-linear-gradient(to bottom, transparent 0, transparent 207px, var(--line) 207px, var(--line) 208px), repeating-linear-gradient(to bottom, transparent 0, transparent 25px, var(--line-2) 25px, var(--line-2) 26px); }
.axis .hr { position: absolute; left: 0; right: 0; font-family: var(--mono); color: var(--muted); }
.axis .hr span { position: relative; top: -7px; }
.blk { position: absolute; border-radius: 6px; padding: 4px 7px; overflow: hidden; border: 2px solid transparent; display: flex; flex-direction: column; min-height: 18px; text-decoration: none; color: inherit; gap: 1px; }
.blk:hover { filter: brightness(1.12); }
.blk b { font-family: var(--mono); font-weight: 500; }
.blk b, .blk .tm, .blk span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 14px; }
.blk .tm { font-family: var(--mono); font-size: 11px; opacity: .8; }
.blk span { opacity: .85; }
.blk .nm { opacity: 1; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.blk.narrow .nm { display: none; }
.blk.hl { box-shadow: 0 0 0 3px var(--leave); animation: hl 1.2s ease-in-out 4; }
@keyframes hl { 50% { box-shadow: 0 0 0 6px var(--leave); } }
.detail { display: none; }
.detail:target { display: flex; flex-direction: column; gap: 8px; position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: min(440px, 100%); overflow-y: auto; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(0,0,0,.18); padding: 18px 18px 90px; }
.detail .close { align-self: flex-end; }
.detail h3 { font-size: 18px; }
.detail h4 { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.detail dl { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; margin: 4px 0 0; font-size: 13px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }
.b-held { background: var(--held); color: #fff; }
.b-held.pending { border-color: var(--accent); }
.b-wanted { border: 2px dashed var(--wanted); color: var(--wanted); background: var(--surface); }
.b-proposed { background: var(--accent); color: #fff; }
.b-fallback { background: var(--line-2); color: var(--ink-2); }
.badge { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--badge); color: #fff; font-size: 11px; font-weight: 700; font-style: normal; line-height: 16px; text-align: center; }
.leave { position: absolute; left: 0; right: 0; height: 6px; margin-top: -8px; background: var(--leave); border-radius: 3px; }

/* Today and Approve: two columns on a laptop, one on a phone */
.two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.two > .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.v-today .page, .v-approve .page { max-width: 1100px; }
.card.big { border-radius: 14px; padding: 18px; gap: 12px; }
.card.big h3 { font-size: 20px; }
.card.big .primary { font-size: 17px; min-height: 52px; }
.card.dim { opacity: .75; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pair > div { border-radius: 10px; padding: 12px; font-size: 13px; }
.side-hold { background: var(--ground); }
.side-opened { background: var(--accent-soft); }
.lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.side-opened .lbl { color: var(--accent-ink); }
.pair .mono { font-size: 14px; font-weight: 500; margin-top: 4px; }
.hero { background: var(--leave); color: var(--on-leave); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.hero .big { font-size: 44px; font-weight: 600; line-height: 1; }
.hero .small { font-size: 13px; }
.row { display: flex; gap: 12px; align-items: baseline; }
.row .t { width: 44px; flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.want { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.panel h2 + .want { border-top: 0; padding-top: 0; }
.split { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.band { color: var(--warn); }
.band-available { color: var(--good); }
.band-unavailable, .band-none { color: var(--bad); }
.bad { color: var(--bad); font-size: 13px; }
.foot { flex-direction: row; align-items: center; }

/* one menu: a row under the header on a laptop, a bottom bar with More on a phone */
.tabs { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: stretch; gap: 4px; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px; text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--line-2); }
.tabs a:focus-visible, .tabs summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tabs a[aria-current] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.tabs .count { font-size: 11px; padding: 1px 7px; }
.tabs .more { display: none; }
.intro { color: var(--ink-2); max-width: 70ch; margin: 0; }
.page h1 { font-size: 24px; }

@media (max-width: 760px) {
  .top { padding: 12px 16px; }
  .layout { padding: 16px; }
  .side { max-width: none; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .two { grid-template-columns: 1fr; }
  .v-today .page, .v-approve .page { font-size: 15px; }
  .tabs { position: fixed; top: auto; left: 0; right: 0; bottom: 0; padding: 4px 4px calc(6px + env(safe-area-inset-bottom, 0px)); border-bottom: 0; border-top: 1px solid var(--line); overflow: visible; gap: 0; }
  .tabs a.t-main, .tabs summary { flex: 1; justify-content: center; padding: 12px 2px; min-height: 48px; font-size: 13px; border-bottom: 0; border-top: 3px solid transparent; }
  .tabs a.t-main[aria-current], .tabs .more.here summary { border-top-color: var(--accent); color: var(--ink); font-weight: 700; }
  .tabs .t-wide { display: none; }
  .tabs .more { display: flex; flex: 1; position: relative; }
  .tabs summary { display: flex; align-items: center; list-style: none; cursor: pointer; color: var(--ink-2); font-weight: 500; }
  .tabs summary::-webkit-details-marker { display: none; }
  .tabs summary::after { content: " ▴"; font-size: 10px; margin-left: 3px; }
  .tabs .menu { position: absolute; right: 4px; bottom: calc(100% + 8px); width: min(300px, calc(100vw - 16px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.22); padding: 6px; display: flex; flex-direction: column; }
  .tabs .menu a { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 0; border-radius: 8px; white-space: normal; }
  .tabs .menu a span { font-size: 12px; color: var(--muted); font-weight: 400; }
  .tabs .menu a[aria-current] { background: var(--line-2); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* static snapshot only */
.actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 14px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.actions a.primary { background: var(--accent); color: #fff; flex: 1 1 auto; }
.actions a.secondary { border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 400; }
.demo code { font-weight: 600; }
.done { background: var(--surface); border: 1px solid var(--good); border-radius: 10px; padding: 12px 14px; }
