* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  --bg: #0b0f19;
  --card: #111827;
  --panel: #161e30;
  --line: #293145;
  --fg: #f8fafc;
  --muted: #a2afc3;
  --accent: #a69aff;
  --primary: #6366f1;
  --green: #5ed6a3;
  --warn: #f4ba68;
  --red: #f17d88;
  font-family: Inter, "DejaVu Sans", Arial, sans-serif;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
}
body.light {
  color-scheme: light;
  --bg: #f2f4fa;
  --card: #fff;
  --panel: #e9edf7;
  --line: #cbd2e0;
  --fg: #1a2233;
  --muted: #4d5b71;
  --accent: #5748b2;
  --green: #167645;
  --warn: #895500;
  --red: #b02d42;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select,
input,
textarea {
  outline-offset: 3px;
}
button,
.btn {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--panel);
  color: var(--fg);
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  text-decoration: none;
}
button:hover,
.btn:hover {
  border-color: var(--accent);
}
button.primary {
  background: #7665ee;
  color: white;
  border-color: #9280ff;
  font-weight: 650;
}
button.flat {
  background: none;
  border: 0;
  color: var(--accent);
  padding: 6px;
}
button.danger {
  color: var(--red);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.ic {
  width: 19px;
  height: 19px;
  display: inline-block;
  vertical-align: middle;
  flex: none;
}
aside {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 226px;
  border-right: 1px solid var(--line);
  background: var(--card);
  display: flex;
  flex-direction: column;
  z-index: 5;
  overflow: auto;
  padding: 22px 14px 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 6px 24px;
}
.logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #7964ea;
  color: white;
}
.logo .ic {
  width: 25px;
  height: 25px;
}
.brand b {
  font-size: 1.02rem;
  display: block;
  letter-spacing: -0.035em;
}
.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font: 12px monospace;
  letter-spacing: 0.07em;
}
.group,
.eyebrow {
  font: 600 0.75rem monospace;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.group {
  margin: 18px 12px 6px;
}
nav button {
  width: 100%;
  justify-content: flex-start;
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  padding: 8px 11px;
  margin: 1px 0;
  gap: 13px;
}
nav button.active {
  background: #302b50;
  color: #d2c8ff;
  border-color: #49406b;
}
.local {
  margin-top: auto;
  padding: 18px 10px 4px;
  color: var(--muted);
  font-size: 0.78rem;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 7px;
}
main {
  margin-left: 226px;
}
header {
  display: flex;
  align-items: center;
  padding: 0 3.1%;
  height: 55px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.83rem;
}
#clock {
  margin-left: auto;
  font-family: monospace;
}
#menu {
  display: none;
}
article {
  padding: 26px 3.1% 50px;
  max-width: 1700px;
  margin: auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  letter-spacing: -0.055em;
  line-height: 1.12;
}
h2 {
  font-size: 1.16rem;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1rem;
}
small,
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 0.9rem;
  line-height: 1.6;
}
.top,
.flex,
.row,
.head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.top,
.head,
.between {
  justify-content: space-between;
}
.top {
  margin-bottom: 22px;
}
.top p {
  margin-top: 7px;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #18192e;
  color: #f8fafc;
  border: 1px solid #3c355a;
  border-radius: 15px;
  min-height: 176px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.hero .eyebrow {
  color: #c1b4ff;
}
.hero h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  letter-spacing: -0.045em;
}
.hero p {
  font-size: 0.9rem;
  color: #c1c2d7;
}
.hero .surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero .chip {
  align-self: flex-start;
  background: #29243f;
  color: #d9ceff;
  border: 1px solid #4a405e;
}
.cards,
.split,
.columns {
  display: grid;
  gap: 15px;
  margin: 16px 0;
}
.cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.split {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}
.columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card,
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  min-width: 0;
}
.card + .card {
  margin-top: 14px;
}
.split > .card,
.columns > .card,
.cards > .card {
  margin: 0;
}
.stat .ic,
.iconbox {
  color: var(--tone, var(--accent));
  background: color-mix(in srgb, var(--tone, var(--accent)) 13%, transparent);
  border-radius: 8px;
  padding: 7px;
  width: 32px;
  height: 32px;
}
.stat label {
  color: var(--muted);
  font-size: 0.88rem;
}
.num {
  font-size: 1.85rem;
  font-weight: 650;
  letter-spacing: -0.045em;
  margin: 12px 0 5px;
}
.num small {
  font-size: 0.9rem;
  letter-spacing: 0;
  font-weight: 400;
}
.stat footer {
  color: var(--muted);
  font-size: 0.79rem;
}
.head {
  margin-bottom: 14px;
}
.row {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  flex-wrap: nowrap;
}
.row > div.grow {
  min-width: 0;
  overflow-wrap: anywhere;
}
.grow {
  flex: 1;
}
.row small,
.block {
  display: block;
  margin-top: 4px;
}
.row strong {
  font-size: 0.9rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--panel);
  font-size: 0.77rem;
  white-space: nowrap;
}
.mono,
time {
  font-family: "DejaVu Sans Mono", monospace;
  font-size: 0.8rem;
}
.bar {
  height: 6px;
  border-radius: 6px;
  background: var(--panel);
  overflow: hidden;
  margin: 8px 0;
}
.bar i {
  height: 100%;
  display: block;
  background: var(--tone, var(--accent));
}
.subrow {
  margin: 18px 0;
}
.subrow b {
  font-size: 0.87rem;
}
.swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 8px;
}
.flow {
  display: grid;
  gap: 12px;
}
.heatwrap,
.tablewrap {
  overflow: auto;
}
.heat {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  justify-content: start;
  gap: 4px;
  padding: 6px 0;
}
.heat button {
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--line);
}
.heat .green,
.green {
  background: #22a86b;
}
.heat .yellow,
.yellow {
  background: #da9d37;
}
.heat .red,
.red {
  background: #b9505b;
}
.legend {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 10px;
}
.legend b {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 2px;
  margin-right: 5px;
}
.list {
  max-height: 65vh;
  overflow: auto;
}
.tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.selected {
  border-color: var(--accent);
  color: var(--accent);
}
input,
select,
textarea {
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  max-width: 100%;
  min-width: 0;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #8576ed;
  cursor: pointer;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.fields label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--muted);
}
textarea {
  min-height: 65px;
  resize: vertical;
}
.wide {
  grid-column: 1/-1;
}
dialog {
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  width: min(630px, 94vw);
  max-height: 86vh;
}
dialog::backdrop {
  background: #050711c9;
}
dialog form > .flex {
  margin-top: 18px;
  justify-content: flex-end;
}
#toast {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 9px;
  z-index: 20;
  font-size: 0.9rem;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.calendar button {
  display: block;
  text-align: left;
  min-height: 70px;
  padding: 7px;
}
.calendar small {
  display: block;
  margin-top: 5px;
  font-size: 0.72rem;
}
.calendar .green,
.calendar .yellow,
.calendar .red {
  color: white;
}
.calendar .green small,
.calendar .yellow small,
.calendar .red small {
  color: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  color: var(--muted);
}
a {
  color: var(--accent);
}
.empty {
  padding: 14px 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.timer {
  text-align: center;
  padding: 35px;
}
.timer strong {
  display: block;
  font: clamp(3rem, 9vw, 7rem) monospace;
  margin: 20px;
}
.chart {
  width: 100%;
  height: 125px;
  color: var(--accent);
}
.compact {
  padding: 5px 8px;
}
.checked {
  text-decoration: line-through;
  color: var(--muted);
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
}
.sectionTitle {
  margin: 24px 0 12px;
}
.metricgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
}
.metricgrid > div {
  background: var(--panel);
  padding: 12px;
  border-radius: 8px;
}
.metricgrid b {
  display: block;
}
.metricgrid small {
  font-size: 0.78rem;
}
#shade {
  display: none;
}
@media (max-width: 1100px) {
  aside {
    width: 196px;
  }
  main {
    margin-left: 196px;
  }
  .card,
  .stat {
    padding: 15px;
  }
  .cards {
    gap: 10px;
  }
  .split {
    grid-template-columns: 1.12fr 1fr;
  }
  .stat .flex {
    gap: 7px;
  }
}
@media (max-width: 820px) {
  aside {
    transform: translateX(-100%);
    width: 230px;
    transition: transform 0.18s;
  }
  body.open aside {
    transform: none;
  }
  body.open #shade {
    display: block;
    position: fixed;
    inset: 0;
    background: #04071199;
    z-index: 4;
  }
  main {
    margin: 0;
  }
  #menu {
    display: inline-flex;
    margin-right: 12px;
    padding: 4px 8px;
  }
  article {
    padding: 18px 16px 50px;
  }
  .split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 580px) {
  .cards,
  .columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 20px;
    min-height: 172px;
  }
  .hero .surface {
    opacity: 0.6;
  }
  .hero h2 {
    max-width: 70%;
  }
  .top {
    gap: 10px;
  }
  .row {
    gap: 7px;
  }
  .row time {
    font-size: 0.72rem;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .calendar button {
    min-height: 48px;
    padding: 3px;
  }
  .calendar small {
    font-size: 0.6rem;
  }
  .card .row .chip {
    white-space: normal;
  }
  .heat {
    grid-auto-columns: 9px;
    grid-template-rows: repeat(7, 9px);
    gap: 3px;
  }
  #clock {
    font-size: 0.7rem;
  }
  .stat .flex {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero p {
    max-width: 75%;
  }
  .top h1 {
    font-size: 1.95rem;
  }
  .head {
    gap: 7px;
  }
}

.heatcontent {
  min-width: calc(var(--weeks) * 13px);
}
.heat,
.months {
  display: grid;
  grid-template-columns: repeat(var(--weeks), minmax(9px, 1fr));
  gap: 4px;
}
.months {
  margin-bottom: 5px;
  color: var(--muted);
  font: 12px monospace;
}
.heat {
  grid-template-rows: repeat(7, 13px);
}
.brand b {
  white-space: nowrap;
  font-size: 0.98rem;
}
.brand {
  gap: 9px;
}
.logo {
  flex-shrink: 0;
}
@media (min-width: 821px) and (max-width: 1100px) {
  .brand b {
    font-size: 0.85rem;
  }
  .brand small {
    font-size: 10px;
  }
}
