:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --green: #12884a;
  --green-bg: #e8f6ee;
  --blue: #1f5fd6;
  --blue-bg: #e8efff;
  --orange: #b95c00;
  --orange-bg: #fff2e0;
  --red: #c2261f;
  --red-bg: #fdeceb;
  --grey-bg: #f1f3f6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }

/* атрибут hidden должен побеждать display из классов ниже, иначе панели
   и меню висят открытыми на пустой странице */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 650; }
h1 { font-size: 21px; letter-spacing: -.2px; }
h2 { font-size: 16px; }
a { color: var(--blue); }

/* ---------------------------------------------------------------- шапка */
.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.btn:hover { background: #fafbfc; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #1a52ba; }
.btn.ghost { box-shadow: none; background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--grey-bg); color: var(--text); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.menu-wrap { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .16);
  padding: 6px;
  min-width: 268px;
  display: flex;
  flex-direction: column;
}
.menu button {
  text-align: left;
  border: 0;
  background: none;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
}
.menu button:hover { background: var(--grey-bg); }
.menu button.danger { color: var(--red); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 2px; }

/* ---------------------------------------------------------------- панель */
.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.month-nav { display: flex; align-items: center; gap: 6px; }
#month-label { font-weight: 650; font-size: 15px; min-width: 158px; text-align: center; text-transform: capitalize; }
.icon-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.icon-btn:hover { background: var(--grey-bg); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.filters select {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 8px;
  background: #fff;
  font-size: 13.5px;
  color: var(--text);
  max-width: 210px;
}

main { padding: 16px 22px 60px; max-width: 1560px; margin: 0 auto; }

/* ---------------------------------------------------------------- показатели */
.kpi {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 118px;
}
.kpi-card .k-label { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.kpi-card .k-value { font-size: 24px; font-weight: 700; letter-spacing: -.4px; line-height: 1.15; }
.kpi-card .k-sub { font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: auto; }
.kpi-card.accent-red .k-value { color: var(--red); }
.kpi-card.accent-green .k-value { color: var(--green); }
.kpi-card.accent-orange .k-value { color: var(--orange); }
.kpi-card.accent-blue .k-value { color: var(--blue); }
.kpi-card.compact .k-value { font-size: 20px; }

/* ---------------------------------------------------------------- вкладки вида */
.view-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.tab.active { background: var(--text); border-color: var(--text); color: #fff; }
.view-note { color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- календарь */
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow {
  padding: 9px 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
  background: #fbfbfc;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.cal-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 9px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: #fff;
  position: relative;
}
.cal-cell:hover { background: #fbfcfe; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.other { background: #fcfcfd; color: #b9bec8; cursor: default; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-cell.holiday { background: #fcfcfd; }
.cal-cell.gap-day { background: #fffafa; }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cal-day-num { font-weight: 700; font-size: 14px; }
.cal-cell.today .cal-day-num { color: var(--blue); }
.cal-day-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.cal-day-tag.red { color: var(--red); }
.cal-day-tag.orange { color: var(--orange); }
.cal-items { display: flex; flex-direction: column; gap: 3px; }
.chip {
  border-radius: 7px;
  padding: 3px 6px;
  font-size: 11.5px;
  line-height: 1.3;
  display: flex;
  gap: 5px;
  justify-content: space-between;
  align-items: baseline;
  border: 1px solid transparent;
  overflow: hidden;
}
.chip .c-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .c-sum { font-weight: 650; white-space: nowrap; }
.chip.blue { background: var(--blue-bg); color: #17408f; border-color: #d5e1fb; }
.chip.orange { background: var(--orange-bg); color: var(--orange); border-color: #f6dab2; }
.chip.red { background: var(--red-bg); color: var(--red); border-color: #f6cfcc; }
.chip.green { background: var(--green-bg); color: var(--green); border-color: #cbecd9; }
.chip.grey { background: var(--grey-bg); color: var(--muted); border-color: #e6e9ee; }
.more-link {
  border: 0; background: none; padding: 0;
  color: var(--blue); font-size: 11.5px; font-weight: 650; text-align: left;
}
.cal-cell-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.balance-line {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  padding: 2px 4px;
  border-radius: 6px;
}
.balance-line b { font-weight: 650; color: var(--text); }
.balance-line.neg { background: var(--red-bg); color: var(--red); }
.balance-line.neg b { color: var(--red); }

/* неделя: те же ячейки, выше */
.cal.week .cal-cell { min-height: 320px; }

/* список по дням */
.daylist { display: flex; flex-direction: column; gap: 10px; }
.daycard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.daycard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  flex-wrap: wrap;
}
.daycard-head .d-date { font-weight: 700; }
.daycard-head .d-meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 12px; flex-wrap: wrap; }
.daycard-body { padding: 10px 14px 13px; display: flex; flex-direction: column; gap: 6px; }
.daycard.today { border-color: #b9cdf7; }
.daycard.past { opacity: .82; }
.empty {
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- карточки-секции */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-top: 16px;
}
.card h2 { margin-bottom: 10px; }
.hint { color: var(--muted); font-size: 12.5px; margin: -4px 0 12px; line-height: 1.45; }

/* внимание */
.att-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.att-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  background: #fff;
}
.att-block.warn { border-color: #f0c9a2; background: #fffdfa; }
.att-block.bad { border-color: #f2c2bf; background: #fffcfc; }
.att-block.good { border-color: #c7e8d5; background: #fbfefc; }
.att-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.att-title { font-size: 13px; font-weight: 650; }
.att-sum { font-size: 13px; font-weight: 700; white-space: nowrap; }
.att-list { display: flex; flex-direction: column; gap: 4px; max-height: 176px; overflow: auto; }
.att-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  padding: 4px 5px;
  border-radius: 7px;
  border: 0;
  background: none;
  text-align: left;
  width: 100%;
}
.att-item:hover { background: var(--grey-bg); }
.att-item .ai-left { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-item .ai-right { font-weight: 650; white-space: nowrap; }
.red-text { color: var(--red); }
.orange-text { color: var(--orange); }
.green-text { color: var(--green); }
.muted { color: var(--muted); }

/* график */
#chart { width: 100%; }
.chart-svg { width: 100%; height: 230px; display: block; overflow: visible; }
.chart-tip {
  position: fixed;
  z-index: 60;
  background: #101828;
  color: #fff;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
  pointer-events: none;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .28);
  max-width: 260px;
}
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* таблица */
.table-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.table-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.table-tools .chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475467;
  white-space: nowrap;
  cursor: pointer;
}
.table-tools .chk input { min-width: 0; width: auto; margin: 0; }
.table-tools input {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 10px;
  min-width: 260px;
  font-size: 13.5px;
}
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table.inv { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1120px; }
table.inv th, table.inv td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.inv th {
  background: #fbfbfc;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
table.inv th.no-sort { cursor: default; }
table.inv tbody tr:hover { background: #fbfcfe; cursor: pointer; }
table.inv td.num, table.inv th.num { text-align: right; white-space: nowrap; }
table.inv tr.cancelled td { color: #98a2b3; text-decoration: line-through; text-decoration-color: #d0d5dd; }
table.inv tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.status-pill.green { background: var(--green-bg); color: var(--green); }
.status-pill.blue { background: var(--blue-bg); color: var(--blue); }
.status-pill.orange { background: var(--orange-bg); color: var(--orange); }
.status-pill.red { background: var(--red-bg); color: var(--red); }
.status-pill.grey { background: var(--grey-bg); color: var(--muted); }
.prio { font-size: 11.5px; }
.prio.high { color: var(--red); font-weight: 650; }
.prio.low { color: var(--muted); }

/* ---------------------------------------------------------------- панель дня */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .38);
  z-index: 50;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100%);
  background: #fff;
  z-index: 55;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(16, 24, 40, .18);
}
.drawer-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.drawer-head h2 { font-size: 17px; }
.drawer-body { padding: 14px 18px 30px; overflow: auto; }
.drawer-section { margin-bottom: 18px; }
.drawer-section h3 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 8px;
}
.day-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.day-tot {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
}
.day-tot .t-label { font-size: 11px; color: var(--muted); }
.day-tot .t-value { font-weight: 700; font-size: 15px; margin-top: 2px; }

.row-item {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
  margin-bottom: 7px;
  background: #fff;
}
.row-item .ri-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.row-item .ri-name { font-weight: 650; font-size: 13.5px; }
.row-item .ri-sum { font-weight: 700; white-space: nowrap; }
.row-item .ri-meta { color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.row-item .ri-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.row-item.small { padding: 8px 10px; }

/* ---------------------------------------------------------------- модальные окна */
.modal {
  position: fixed;
  z-index: 60;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  background: #fcfcfd;
}
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 14px;
  background: #fff;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid #c8d8fb;
  border-color: var(--blue);
}
.field .err { color: var(--red); font-size: 12px; }
.field-note { font-size: 11.5px; color: var(--muted); }
.form-error {
  background: var(--red-bg);
  color: var(--red);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  margin-bottom: 12px;
}
.form-ok {
  background: var(--green-bg);
  color: var(--green);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  margin-bottom: 12px;
}
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13.5px; margin-bottom: 14px; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 650; text-align: right; }

/* уведомления */
.toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 22px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(440px, calc(100% - 24px));
}
.toast {
  background: #101828;
  color: #fff;
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .3);
}
.toast.err { background: var(--red); }
.toast.ok { background: #0b5d33; }

/* ---------------------------------------------------------------- мобильный */
@media (max-width: 1180px) {
  .kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .att-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .top { padding: 14px 14px 10px; }
  .toolbar { padding: 10px 14px; position: static; }
  main { padding: 12px 14px 48px; }
  h1 { font-size: 18px; }
  .kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .kpi-card { min-height: 96px; padding: 11px 12px; }
  .kpi-card .k-value { font-size: 19px; }
  .kpi-card.compact .k-value { font-size: 17px; }
  .att-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filters { width: 100%; }
  .filters label { flex: 1 1 46%; }
  .filters select { width: 100%; max-width: none; }
  .top-actions { width: 100%; }
  .top-actions .btn { flex: 1 1 auto; }
  .day-totals { grid-template-columns: 1fr 1fr; }
  .table-tools input { min-width: 0; width: 100%; }
  .table-tools { width: 100%; }
  #month-label { min-width: 120px; font-size: 14px; }
  .modal { top: auto; bottom: 0; left: 0; transform: none; width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; }
  .chart-svg { height: 200px; }
}

/* ------------------------------------------ таблица «по дням» (как в Google) */
.daysgrid {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
  max-height: 72vh;
}
.daysgrid table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 12.5px; }
.daysgrid th, .daysgrid td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.daysgrid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8fa;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.15;
}
.daysgrid thead th.dg-day { cursor: pointer; }
.daysgrid thead th small { display: block; font-weight: 500; font-size: 10px; opacity: .8; }
.daysgrid thead th.is-holiday { color: var(--red); }
.daysgrid thead th.is-today { background: var(--blue-bg); color: var(--blue); }
.daysgrid .dg-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: left;
  font-weight: 600;
  min-width: 190px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.daysgrid thead th.dg-name { z-index: 3; background: #f7f8fa; }
.daysgrid tfoot th, .daysgrid tfoot td { position: sticky; bottom: 0; background: #f7f8fa; font-weight: 700; border-bottom: 0; }
.daysgrid tfoot th.dg-name { z-index: 3; }
.daysgrid td.dg-cell { text-align: right; color: var(--muted); cursor: pointer; }
.daysgrid td.dg-cell:hover { background: #f2f5fb; }
.daysgrid td.dg-blue { color: var(--blue); }
.daysgrid td.dg-red { color: var(--red); font-weight: 650; }
.daysgrid td.dg-green { color: var(--green); }
.daysgrid td.dg-total, .daysgrid th.dg-total { text-align: right; font-weight: 700; }
.daysgrid td.dg-strong { color: var(--text); }
.daysgrid tr.dg-rec .dg-name { font-weight: 500; }

@media (max-width: 640px) {
  .daysgrid .dg-name { min-width: 132px; max-width: 132px; font-size: 12px; }
  .daysgrid th, .daysgrid td { padding: 5px 5px; }
  .daysgrid table { font-size: 11.5px; }
  .daysgrid thead th { font-size: 10.5px; }
}

/* ------------------------------------------------------------- проекты */
.projects { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.proj-tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
}
.proj-tab.active { background: var(--green); border-color: var(--green); color: #fff; }
@media (max-width: 640px) {
  .projects { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
}
