:root {
  color-scheme: dark;
  --bg: #101112;
  --panel: #191b1d;
  --line: #2a2d30;
  --text: #f3f4ef;
  --muted: #9b9f9b;
  --accent: #e6ff9a;
  --orange: #ffb36e;
  --red: #ff8c8c;
  --green: #a6e8be;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #242729;
  color: var(--text);
  padding: 11px 16px;
  min-height: 44px;
}
button:disabled {
  opacity: 0.4;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button:hover,
a.card:hover {
  border-color: #70786b;
}
header {
  height: 82px;
  max-width: 1320px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 700;
}
.brand i {
  color: var(--accent);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -5px;
  font-style: normal;
}
.header-actions {
  display: flex;
  gap: 8px;
}
.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #141a0b;
  font-weight: 750;
}
.danger {
  color: var(--red);
}
.small {
  font-size: 12px;
  padding: 7px 11px;
  min-height: 36px;
}
main {
  max-width: 1248px;
  margin: 0 auto;
  padding: 42px 0 100px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1.15;
}
h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
.muted,
.eyebrow {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
.topline .muted {
  margin-top: 10px;
}
.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.badge {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--green);
}
.badge.archived {
  color: var(--muted);
}
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.event-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  text-align: left;
  width: 100%;
  min-height: 230px;
  position: relative;
  overflow: hidden;
}
.event-card h2 {
  font-size: 28px;
  letter-spacing: -1px;
  margin: 24px 0 7px;
}
.event-card .arrow {
  position: absolute;
  right: 28px;
  top: 27px;
  font-size: 24px;
  color: var(--accent);
}
.event-card .summary {
  display: flex;
  gap: 30px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.summary strong {
  font-size: 19px;
  font-weight: 550;
}
.event-card.upcoming {
  background: linear-gradient(135deg, #242b1d, #191b1d 70%);
  border-color: #404b31;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}
.toolbar select {
  max-width: 330px;
}
.back {
  color: var(--muted);
  font-size: 13px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.metric {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 21px;
}
.metric > span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 12px;
}
.metric strong {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 550;
  letter-spacing: -1px;
}
.metric.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #172010;
}
.metric.accent span {
  color: #4b5c31;
}
.metric small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}
.metric.accent small {
  color: #4b5c31;
}
.two-col {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
}
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 20px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.panel-head a {
  font-size: 12px;
  color: var(--accent);
}
.bar-row {
  margin: 18px 0;
}
.bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  gap: 12px;
}
.bar-info span {
  color: var(--muted);
}
.track {
  height: 6px;
  background: #30342d;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}
.fill {
  height: 100%;
  background: var(--accent);
  border-radius: 5px;
}
.fill.over {
  background: var(--orange);
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.row .muted {
  font-size: 12px;
  margin-top: 3px;
}
.row strong {
  white-space: nowrap;
}
.empty {
  color: var(--muted);
  padding: 30px 0;
  text-align: center;
  font-size: 14px;
}
.note {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 19px;
  background: var(--panel);
  margin-bottom: 12px;
}
.note .note-body {
  white-space: pre-wrap;
  margin: 12px 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.note.done {
  opacity: 0.55;
}
.note-meta {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.note-actions {
  display: flex;
  gap: 8px;
}
.pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange);
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0;
}
input,
select,
textarea {
  width: 100%;
  color: var(--text);
  background: #121415;
  border: 1px solid #393d3e;
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
  min-height: 46px;
}
textarea {
  min-height: 145px;
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #8ba755;
  outline-offset: 1px;
}
input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  vertical-align: middle;
  margin-right: 10px;
  accent-color: var(--accent);
}
.inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.inline label {
  min-width: 0;
}
.search {
  margin: 0 0 18px;
}
.filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}
.filters button {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 12px;
}
.filters .active {
  background: var(--accent);
  color: #142008;
  border-color: var(--accent);
}
.person-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.person h3 {
  font-size: 15px;
}
.person .muted {
  font-size: 11px;
}
.person details {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.person summary {
  cursor: pointer;
}
.person .enter {
  color: #172010;
  background: var(--accent);
  font-weight: 750;
  min-width: 80px;
}
.person .entered {
  color: var(--red);
  font-size: 12px;
}
.due {
  color: var(--orange);
  font-size: 12px;
}
.person-buttons {
  text-align: right;
  flex-shrink: 0;
}
dialog {
  color: var(--text);
  background: #1b1e1f;
  border: 1px solid #404541;
  border-radius: 20px;
  width: calc(100% - 24px);
  max-width: 490px;
  max-height: 90dvh;
  padding: 26px;
}
dialog::backdrop {
  background: #000b;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-head button {
  padding: 6px 10px;
  min-height: 36px;
}
.full {
  width: 100%;
}
.error {
  color: var(--red);
  font-size: 13px;
  min-height: 20px;
  margin: 8px 0;
}
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login form {
  max-width: 380px;
  width: 100%;
}
.login h1 {
  font-size: 40px;
  margin: 45px 0 30px;
}
.login .primary {
  width: 100%;
}
#toast {
  display: none;
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 22px;
  background: var(--accent);
  color: #18230e;
  border-radius: 12px;
  z-index: 30;
  max-width: 90%;
  font-size: 14px;
}
#toast.error {
  background: #542e2e;
  color: #fff;
}
#nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #242729f5;
  border: 1px solid #3a4038;
  border-radius: 18px;
  padding: 7px;
  display: flex;
  gap: 5px;
  z-index: 10;
  box-shadow: 0 8px 45px #0006;
}
#nav[hidden] {
  display: none;
}
#nav button {
  border: 0;
  background: none;
  padding: 10px 23px;
  color: var(--muted);
  font-size: 13px;
}
#nav button.active {
  background: var(--accent);
  color: #142008;
}
footer {
  position: fixed;
  bottom: 4px;
  right: 18px;
  color: #737b70;
  font-size: 10px;
  z-index: 1;
}
.negative {
  color: var(--orange);
}
.section-hint {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 18px;
}
.export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.export-grid a {
  padding: 14px;
  background: #25292a;
  border-radius: 10px;
  font-size: 13px;
}
.loading {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 1300px) {
  main {
    padding-left: 30px;
    padding-right: 30px;
  }
}
@media (max-width: 700px) {
  header {
    height: 68px;
    padding: 0 18px;
  }
  main {
    padding: 27px 16px 125px;
  }
  .brand span {
    font-size: 10px;
  }
  .brand i {
    font-size: 36px;
  }
  .header-actions {
    gap: 0;
  }
  .header-actions button {
    font-size: 12px;
    padding: 8px;
  }
  h1 {
    font-size: 31px;
  }
  .topline {
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 10px;
  }
  .topline .top-actions {
    flex-shrink: 0;
  }
  .topline .primary {
    font-size: 12px;
    padding: 11px 12px;
  }
  .event-grid,
  .two-col,
  .person-list {
    grid-template-columns: 1fr;
  }
  .event-card {
    padding: 23px;
    min-height: 225px;
  }
  .event-card h2 {
    font-size: 27px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .metric {
    padding: 17px;
  }
  .metric strong {
    font-size: 27px;
  }
  .metric > span {
    font-size: 11px;
    margin-bottom: 9px;
  }
  .panel {
    padding: 20px;
  }
  .toolbar {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 23px;
  }
  .toolbar select {
    flex: 1;
    min-width: 160px;
    font-size: 14px;
  }
  .toolbar .quiet {
    padding: 8px;
  }
  .person {
    padding: 13px;
  }
  .person h3 {
    font-size: 14px;
  }
  #nav {
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: calc(100% - 28px);
    justify-content: space-between;
    gap: 0;
  }
  #nav button {
    flex: 1;
    padding: 10px 6px;
    font-size: 12px;
  }
  footer {
    bottom: 2px;
    right: 12px;
    font-size: 9px;
  }
  .note-actions button {
    font-size: 11px;
  }
  dialog {
    padding: 21px;
  }
  .event-card .summary {
    gap: 24px;
  }
  .inline {
    gap: 10px;
  }
  .export-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.12s,
      border-color 0.12s;
  }
}
