:root {
  --stage: #b7c0cb;
  --bg: #f2f4f7;
  --ink: #14181f;
  --muted: #5c6775;
  --faint: #8b949f;
  --line: #e1e6ec;
  --high: #7c1a28;
  --high-ink: #fff7f6;
  --medium: #1d4f8f;
  --low: #8a93a0;
  --shadow: 0 24px 60px rgba(20, 28, 40, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: Outfit, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--medium);
  outline-offset: 2px;
}
::selection { background: rgba(29, 79, 143, 0.18); }

.app {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

.brand, .only-desk, .tab.done, .tab.account { display: none; }

.status {
  height: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 22px 8px;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}
.status b {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 12px;
}
.who {
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: var(--medium);
}
.who.is-on { color: var(--ink); }
.screen {
  flex: 1;
  overflow: auto;
  padding: 4px 18px calc(96px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }

.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.priority-mark {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.priority-mark.high { background: var(--high); color: var(--high-ink); }
.priority-mark.medium {
  background: white;
  color: var(--medium);
  border: 1px solid var(--line);
  box-shadow: inset 6px 0 0 var(--medium);
  padding-left: 16px;
}
.priority-mark + .display { margin-top: 12px; }
.priority-mark.low {
  background: white;
  color: #3c4450;
  border: 1px solid var(--line);
}
.display {
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 4px;
}
.display.title { font-size: 32px; }
.quiet { color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 8px; }
.flash {
  margin-bottom: 12px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 12px -4px;
  padding: 4px;
}

.notice {
  margin-top: 14px;
  padding: 12px 12px 10px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: white;
}
.notice p { font-size: 14px; line-height: 1.4; }
.notice button { margin-top: 8px; color: var(--high); font-weight: 700; font-size: 13px; }

.band {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 16px 0 6px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 13px;
  text-transform: uppercase;
}
.band.high { color: var(--high); }
.band.medium { color: var(--medium); }
.band.low { color: var(--low); }
.band span {
  font-family: Outfit, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  font-size: 12px;
  text-transform: none;
}

.card { display: block; width: 100%; text-align: left; margin-top: 8px; }
.card strong { display: block; letter-spacing: -0.01em; line-height: 1.25; }
.card .note, .card .why, .card .meta, .card .lead { display: block; }
.meta { margin-top: 8px; font-size: 12px; font-weight: 600; }
.lead { margin-top: 6px; font-size: 13px; font-weight: 600; }
.why {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.4;
}

.card.high {
  background: var(--high);
  color: var(--high-ink);
  border-radius: 16px;
  padding: 12px 14px;
}
.card.high .eyebrow,
.card.medium .eyebrow,
.card.low .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card.high strong {
  font-weight: 700;
  font-size: 22px;
  margin-top: 4px;
}
.card.high.is-next strong { font-size: 26px; }
.card.high .note, .card.high .why, .card.high .meta, .card.high .lead { color: rgba(255, 247, 246, 0.82); }
.card.high .why { border-top-color: rgba(255, 247, 246, 0.35); }
.card.high .note { margin-top: 2px; font-size: 13px; }
.card.high .why, .card.medium .why {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card.medium {
  background: white;
  border: 1px solid var(--line);
  border-left: 7px solid var(--medium);
  border-radius: 12px;
  padding: 12px 14px 12px 12px;
  color: var(--ink);
}
.card.medium .eyebrow { color: var(--medium); }
.card.medium strong { font-size: 18px; font-weight: 600; margin-top: 4px; }
.card.medium .note, .card.medium .lead { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card.medium .lead { margin-top: 6px; font-size: 13px; }
.card.medium .why { font-size: 13.5px; color: #2c3440; }

.card.low {
  padding: 11px 2px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin-top: 0;
}
.card.low .eyebrow { color: var(--low); }
.card.low strong { font-size: 15px; font-weight: 500; color: #4d5662; margin-top: 2px; }
.card.low .note, .card.low .meta, .card.low .why, .card.low .lead { color: var(--faint); font-size: 13px; }
.card.low .why { margin-top: 4px; }
.empty { color: var(--faint); font-size: 13px; padding: 4px 0 2px; }

.stake,
.facts div {
  display: grid;
  grid-template-columns: 8.75rem minmax(0, 1fr);
  column-gap: 16px;
  align-items: baseline;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.stake span, .facts dt {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.stake p, .facts dd { font-size: 15px; line-height: 1.4; }
.facts { margin-top: 0; }
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin-top: 8px;
  padding-top: 8px;
}
.actions form { display: contents; }
.linkish {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0;
  color: var(--medium);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}
.linkish.danger { color: var(--high); }
.delete { margin-top: 22px; }

.park {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.park strong { display: block; font-size: 16px; }
.park small { display: block; color: var(--muted); margin-top: 3px; font-size: 13px; }
.park form { margin-top: 6px; }

.btn {
  height: 46px;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 700;
  background: var(--ink);
  color: white;
}
.btn.block { width: 100%; margin-top: 16px; }
.btn.line {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}
.auth-switch { margin-top: 16px; }
.auth-switch a { color: var(--medium); font-weight: 700; }
.app:not(:has(.tabbar)) .screen { padding-bottom: 28px; }

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(72px + env(safe-area-inset-bottom, 0px));
  padding: 0 12px env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: center;
  z-index: 5;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tab.is-on { color: var(--ink); }
.fab {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
}

.lbl {
  display: block;
  margin: 14px 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.composer input[type="text"],
.composer input[type="password"],
.composer input[type="date"],
.composer input[type="number"],
.composer textarea {
  width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.composer textarea { min-height: 68px; resize: vertical; }
.composer input.minutes { width: 120px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; }
.pick input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.pick span {
  display: block;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}
.pick input:focus-visible + span { outline: 2px solid var(--medium); outline-offset: 2px; }
.pick input:checked + span { background: var(--ink); color: white; border-color: transparent; }
.pick.high input:checked + span { background: var(--high); }
.pick.medium input:checked + span { background: var(--medium); }
.pick.low input:checked + span { background: #3c4450; }

@media (min-width: 960px) {
  body { overflow: hidden; }
  .app {
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .status { display: none; }
  .screen {
    grid-row: 2;
    min-height: 0;
    padding: 28px max(32px, calc((100vw - 1120px) / 2)) 56px;
  }
  .tabbar {
    grid-row: 1;
    position: sticky;
    top: 0;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 max(32px, calc((100vw - 1120px) / 2));
    border-top: 0;
    border-bottom: 1px solid var(--line);
    grid-template-columns: none;
  }
  .brand {
    display: block;
    margin-right: 16px;
    padding-right: 18px;
    border-right: 1px solid var(--line);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 13px;
  }
  .only-desk { display: inline; }
  .tab.done, .tab.account { display: flex; }
  body:not(:has(.tabbar)) { overflow: auto; }
  .app:not(:has(.tabbar)) {
    display: block;
    height: auto;
    overflow: visible;
  }
  .app:not(:has(.tabbar)) .screen { padding-top: 48px; }
  .tab {
    flex-direction: row;
    width: auto;
    gap: 8px;
    padding: 8px 12px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
  }
  .tab.is-on {
    color: var(--ink);
    box-shadow: inset 0 -2px 0 var(--ink);
    border-radius: 0;
  }
  .tab.account {
    order: 2;
    margin-left: auto;
    max-width: 16ch;
  }
  .tab.account span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tab.add { order: 3; }
  .tabbar .tab:last-child:not(.account) { order: 1; }
  .tab.add {
    margin-left: 8px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--ink);
    color: white;
    box-shadow: none;
  }
  .tab.add .fab {
    width: auto;
    height: auto;
    background: transparent;
    color: white;
    border-radius: 0;
  }
  .page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 40px;
    margin-bottom: 8px;
  }
  .page-head .quiet { max-width: 340px; margin-top: 0; }
  .back { display: none; }
  .bands {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.85fr);
    gap: 28px;
    align-items: start;
    margin-top: 18px;
  }
  .column .band:first-child { margin-top: 0; }
  .card.high .why, .card.medium .why {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .sheet { max-width: 640px; }
  .park:has(form) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .park form { margin-top: 0; flex: none; }
}
