:root {
  --page: #f3f5fb;
  --header: rgba(247, 249, 253, .88);
  --header-ink: #121826;
  --header-muted: #6b778c;
  --ink: #141c2b;
  --muted: #6b778c;
  --accent: #3d5cff;
  --pill: rgba(20, 28, 43, .06);
  --pill-ink: #1a2436;
  --row: #fff;
  --row-line: rgba(16, 24, 40, .08);
  --row-hover: #f7f9fd;
  --league: #eef2f8;
  --league-ink: #3a465c;
  --big: #14804a;
  --big-bg: rgba(20, 128, 74, .12);
  --medium: #9a6b00;
  --medium-bg: rgba(242, 190, 65, .18);
  --short: #3451c7;
  --short-bg: rgba(61, 92, 255, .12);
  --error: #c13945;
  --error-bg: rgba(255, 83, 94, .12);
  --none: #667285;
  --glass-line: rgba(16, 24, 40, .1);
  --shadow: 0 12px 30px rgba(20, 28, 43, .08);
  --top: 168px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --page: #06080d;
  --header: rgba(8, 11, 18, .82);
  --header-ink: #f8fafc;
  --header-muted: #7f8da3;
  --ink: #eef3fa;
  --muted: #7f8da3;
  --accent: #7590ff;
  --pill: rgba(255,255,255,.055);
  --pill-ink: #eaf0f8;
  --row: rgba(10, 14, 21, .76);
  --row-line: rgba(255,255,255,.055);
  --row-hover: rgba(255,255,255,.055);
  --league: rgba(16, 23, 34, .93);
  --league-ink: #dbe5f4;
  --big: #7ee2a8;
  --big-bg: rgba(42, 199, 111, .13);
  --medium: #f4cb76;
  --medium-bg: rgba(242, 190, 65, .12);
  --short: #9ab5ff;
  --short-bg: rgba(85, 119, 255, .14);
  --error: #ff8d93;
  --error-bg: rgba(255, 83, 94, .12);
  --none: #667285;
  --glass-line: rgba(255,255,255,.085);
  --shadow: 0 22px 60px rgba(0,0,0,.34);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--page); color: var(--ink); }
body {
  font: 12px/1.35 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
header.top {
  position: sticky;
  top: 0;
  z-index: 20;
}
.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.055);
  background:
    radial-gradient(240px 80px at 14% 0%, rgba(103,132,255,.13), transparent 75%),
    #090b11;
}
h1 { display: flex; align-items: center; margin: 0; min-width: 0; }
.logo { height: 39px; width: auto; display: block; }
.brand-actions { display: flex; align-items: center; gap: 7px; }
.brandbar button,
.brandbar a.board-switch {
  height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 11px;
  background: rgba(255,255,255,.045);
  color: rgba(237,243,250,.76);
  font: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.brandbar button.icon-btn {
  width: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brandbar button.icon-btn svg { width: 16px; height: 16px; display: block; }
html[data-theme="light"] .brandbar {
  border-bottom-color: #e4e8f2;
  background: linear-gradient(180deg, #ffffff, #f7f9fd);
}
html[data-theme="light"] .brandbar button,
html[data-theme="light"] .brandbar a.board-switch {
  border-color: #e4e8f2;
  background: #eef1f8;
  color: #10141f;
}
button {
  border: 0; background: var(--pill); color: var(--pill-ink);
  border-radius: 999px; padding: 7px 12px; cursor: pointer; font: inherit;
}
button.on, .chips button.on, .days button.on {
  background: var(--accent); color: #fff;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 18px 0;
}
.tile {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  text-align: left;
  border-radius: 18px;
  padding: 12px;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(120, 132, 150, .16), transparent 55%),
    linear-gradient(180deg, #f4f6f8, #e7eaee);
  border: 1px solid rgba(70, 80, 96, .16);
  box-shadow: var(--shadow);
}
.tile.on {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(90, 104, 128, .22), transparent 52%),
    linear-gradient(180deg, #eef1f5, #e2e6ec);
  border-color: #8b97a8;
  color: var(--ink);
}
.tile-head, .tile-who, .tile-project, .tile-stat, .tile-copy {
  display: flex;
  align-items: center;
  min-width: 0;
}
.tile-head { justify-content: space-between; gap: 8px; }
.tile-who { gap: 8px; }
.tile-who svg { width: 18px; height: 18px; flex: none; color: #6d7888; }
.tile-stat > svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: #6d7888;
}
.tile-name {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.tile-project {
  gap: 6px;
  flex: none;
  height: 28px;
  padding: 0 4px 0 10px;
  border-radius: 999px;
  background: rgba(20, 28, 43, .06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.tile-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}
.tile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tile-stat {
  gap: 4px;
  justify-content: center;
  min-width: 0;
  min-height: 42px;
  padding: 6px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(16, 24, 40, .06);
}
.tile-copy { flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; overflow: hidden; }
.tile-count, .tile-cost, .tile-views {
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--ink);
  min-width: 0;
}
html[data-theme="dark"] .tile {
  color: #f4f7fb;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(180, 190, 205, .16), transparent 46%),
    linear-gradient(160deg, #2a3140 0%, #1a1f28 58%, #12151c 100%);
  border-color: rgba(190, 198, 210, .16);
}
html[data-theme="dark"] .tile.on {
  color: #f4f7fb;
  border-color: rgba(220, 226, 234, .55);
  box-shadow: 0 0 0 1px rgba(220, 226, 234, .18), var(--shadow);
}
html[data-theme="dark"] .tile-who svg,
html[data-theme="dark"] .tile-stat > svg { color: #c5ced8; }
html[data-theme="dark"] .tile-project {
  background: rgba(8, 14, 18, .45);
  color: #d5deea;
  border: 1px solid rgba(255, 255, 255, .06);
}
html[data-theme="dark"] .tile-stat {
  background: rgba(6, 12, 16, .42);
  border-color: rgba(255, 255, 255, .05);
}
html[data-theme="dark"] .tile-count,
html[data-theme="dark"] .tile-cost,
html[data-theme="dark"] .tile-views { color: #f7fbff; }
@container (max-width: 280px) {
  .tile { padding: 8px; gap: 8px; }
  .tile-name { font-size: 14px; }
  .tile-stats { gap: 4px; }
  .tile-stat { min-height: 0; padding: 5px 1px; gap: 2px; }
  .tile-stat > svg { width: 12px; height: 12px; }
  .tile-count, .tile-cost, .tile-views { font-size: 12px; }
}
@container (max-width: 210px) {
  .tile-project { padding-left: 4px; }
  .tile-project span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (max-width: 720px) {
  .brandbar { height: auto; min-height: 52px; padding: 8px 10px; gap: 8px; }
  .logo { height: 30px; }
  .brand-actions { gap: 4px; }
  .brandbar button,
  .brandbar a.board-switch { height: 30px; padding: 0 8px; font-size: 12px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 12px 0; }
  .tile { padding: 8px; gap: 8px; border-radius: 16px; }
  .tile-head { gap: 6px; }
  .tile-who { gap: 6px; }
  .tile-who svg { width: 16px; height: 16px; }
  .tile-name { font-size: 15px; }
  .tile-stats { gap: 3px; }
  .tile-stat {
    flex-direction: row;
    min-height: 28px;
    padding: 4px 0;
    gap: 1px;
    border-radius: 10px;
  }
  .tile-stat > svg { width: 10px; height: 10px; }
  .tile-count, .tile-cost, .tile-views { font-size: 11px; }
  .days { margin: 10px 12px 0; gap: 6px; }
  .board { padding: 12px 12px 32px; }
  .row { padding: 10px 12px; }
}
.days {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 18px 0;
  min-height: 44px;
  position: relative;
}
.date-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.days .date-arrow,
.days .date-current {
  display: inline-flex;
  align-items: center;
  height: 32px;
  border-radius: 10px;
  background: var(--pill);
}
.date-arrow {
  width: 32px;
  flex: none;
  padding: 0;
  justify-content: center;
}
.date-arrow svg,
.date-current svg { width: 16px; height: 16px; }
.date-arrow:disabled { opacity: 0.35; }
.date-current {
  flex: 1;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  min-width: 0;
}
.day-menu {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: min(68vh, 520px);
  overflow: auto;
  padding: 0;
  border: 1px solid #e4e8f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(16, 24, 40, .16);
}
html[data-theme="dark"] .day-menu {
  border-color: rgba(255,255,255,.09);
  background: #0c1018;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.day-menu[hidden] { display: none; }
.day-menu-head,
.days .day-menu button {
  display: grid;
  grid-template-columns: minmax(72px, 1.05fr) repeat(6, minmax(58px, 1fr));
  align-items: center;
  gap: 0;
  width: 100%;
  min-width: 680px;
  padding: 0 6px;
  text-align: center;
}
.days .day-menu button {
  height: 42px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(16, 24, 40, .08);
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}
.days .day-menu button:last-child { border-bottom: 0; }
.days .day-menu button:hover { background: rgba(16, 24, 40, .04); }
.day-menu-head {
  position: sticky;
  top: 0;
  z-index: 1;
  height: auto;
  min-height: 48px;
  padding-top: 6px;
  padding-bottom: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(16, 24, 40, .1);
}
.day-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.05;
}
.day-col-site { font-size: 10px; letter-spacing: .04em; }
.day-col-sp .day-col-site { color: #1f8a4c; }
.day-col-sb .day-col-site { color: #6d4aff; }
.day-col .metrika { width: 14px; height: 14px; display: block; }
.day-menu-head span { text-align: center; }
html[data-theme="dark"] .day-menu-head {
  background: #0c1018;
  border-bottom-color: rgba(255,255,255,.1);
}
html[data-theme="dark"] .days .day-menu button {
  border-bottom-color: rgba(255,255,255,.07);
  color: #eef3fa;
}
html[data-theme="dark"] .days .day-menu button:hover { background: rgba(255,255,255,.04); }
.day-menu .when { text-align: center; text-transform: none; letter-spacing: 0; font-weight: 700; }
.day-count,
.day-money,
.day-views {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.day-count, .day-views { color: inherit; }
.day-money { color: var(--muted); font-size: 13px; }
.day-menu-head .day-views { display: flex; justify-content: center; }
.day-menu-head .metrika { width: 14px; height: 14px; display: block; }
.days .day-menu button[aria-pressed="true"] { background: #e8eef8; }
html[data-theme="dark"] .days .day-menu button[aria-pressed="true"] { background: rgba(255,255,255,.07); }
.board { padding: 16px 18px 40px; max-width: 1280px; }
.league {
  margin: 0 0 14px; background: var(--league); color: var(--league-ink);
  border-radius: 0 16px 16px 0; overflow: hidden; box-shadow: var(--shadow);
}
.league h2 {
  margin: 0; padding: 9px 14px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(0,0,0,.04);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.league-side {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
}
.league-cost {
  letter-spacing: 0;
  font-weight: 700;
  opacity: .75;
}
.fold {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: inherit;
}
.fold svg { width: 16px; height: 16px; display: block; }
.fold.closed svg { transform: rotate(-90deg); }
html[data-theme="dark"] .league h2 { background: rgba(111, 88, 30, .26); color: #f7dda0; }
.row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) max-content;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 14px;
  background: var(--row);
  border-top: 1px solid var(--row-line);
}
.row:hover { background: var(--row-hover); }
.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.clock {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  line-height: 1;
}
.metric:empty { display: none; }
.metric, a.metric {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  color: var(--muted);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}
.metric .metrika { width: 12px; height: 12px; flex: none; }
.days button.traffic-sort {
  flex: none;
  height: 32px;
  border: 1px solid var(--glass-line);
  background: transparent;
  color: var(--muted);
}
.days button.traffic-sort[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--ink);
  font-weight: 700;
  background: transparent;
}
.title {
  white-space: normal;
  overflow: visible;
  line-height: 1.35;
}
.title a { color: inherit; text-decoration: none; }
.title a:hover { text-decoration: underline; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  line-height: 1;
}
.badge.done { color: var(--big); background: var(--big-bg); }
.badge.work { color: var(--short); background: var(--short-bg); }
.badge.skip { color: var(--none); background: var(--pill); }
.badge.block { color: var(--error); background: var(--error-bg); }
.src a { color: var(--accent); text-decoration: none; }
.src, .bx { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 40px 12px; color: var(--muted); text-align: center; }
.note { margin: 0 0 12px; color: var(--muted); }
header.top,
.tiles,
.days,
.board {
  width: min(760px, calc(100% - 20px));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}
.board { padding-left: 0; padding-right: 0; }
