:root {
  --paper: #f3f5f2;
  --white: #fff;
  --ink: #182c25;
  --sub: #52645c;
  --line: #d3d9cf;
  --pine: #24513f;
  --mint: #dfebdf;
  --terra: #93482e;
  --warn: #f9ead8;
  --error: #8a3031;
  --sans: "Source Sans 3","Arial","DejaVu Sans",sans-serif;
  font: 15px/1.48 var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  caret-color: var(--pine);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,input,select,textarea {
  font: inherit;
}

a {
  color: var(--pine);
  text-underline-offset: .22em;
}

button,.button {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  color: var(--ink);
  padding: .58rem .91rem;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

button:hover,.button:hover {
  background: #eef2e9;
  border-color: #8fa093;
}

.primary {
  background: var(--pine);
  color: white;
  border-color: var(--pine);
}

.primary:hover {
  background: #163e2f;
  color: white;
}

.danger {
  color: var(--error);
  border-color: #d2b6af;
}

.quiet {
  border-color: transparent;
  background: transparent;
}

.quiet:hover {
  background: var(--mint);
}

button:disabled {
  opacity: .54;
  cursor: wait;
}

a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline: 3px solid #438576;
  outline-offset: 3px;
}

::selection {
  background: #bdd7b8;
}

header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.bar,.nav,main {
  width: min(1250px,calc(100% - 56px));
  margin: auto;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.mark {
  width: 28px;
  height: 30px;
  border-radius: 3px;
  background: var(--pine);
  clip-path: polygon(0 0,44% 0,50% 21%,58% 0,100% 0,72% 63%,72% 100%,29% 100%,29% 63%);
}

.brand b {
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -.035em;
}

.brand span:last-child {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sub);
  font-size: .86rem;
}

.nav {
  display: flex;
  gap: 24px;
  overflow-x: auto;
}

.nav a,.subnav a {
  color: var(--sub);
  text-decoration: none;
  padding: .75rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-weight: 600;
}

.nav a[aria-current],.subnav a[aria-current] {
  color: var(--pine);
  border-color: var(--pine);
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  font-size: .91rem;
}

.nav a:hover,.subnav a:hover {
  color: #122e22;
}

main {
  padding: 32px 0 70px;
}

.head,.sectionhead,.actions,.toolbar,.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.head,.sectionhead {
  justify-content: space-between;
}

.head {
  margin-bottom: 24px;
}

h1,h2,h3,p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem,4vw,3.2rem);
  line-height: 1.07;
  letter-spacing: -.04em;
  font-weight: 650;
}

h2 {
  font-size: 1.38rem;
  line-height: 1.22;
  letter-spacing: -.025em;
}

h3 {
  font-size: 1.08rem;
  margin-bottom: .55em;
}

.sub,.empty,small,.muted {
  color: var(--sub);
}

.sub {
  margin-top: 7px;
  max-width: 76ch;
}

.empty {
  padding: 20px 0;
}

.toolbar {
  margin-bottom: 16px;
}

.sectionhead {
  margin-bottom: 14px;
}

.section {
  margin: 28px 0;
}

.sheet {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 24px;
}

.sheet+.sheet {
  margin-top: 16px;
}

.grid2 {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(275px,.8fr);
  gap: 22px;
  align-items: start;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  background: #e9eee4;
  border: 1px solid #d0dbce;
  border-radius: 7px;
  margin: 0 0 24px;
}

.stat {
  padding: 17px 18px;
}

.stat:not(:last-child) {
  border-right: 1px solid #ccd7c9;
}

.stat strong {
  display: block;
  font-size: 2.12rem;
  font-weight: 620;
  line-height: 1.13;
}

.stat span {
  font-size: .83rem;
  color: #425b4d;
}

.emp {
  display: grid;
  align-items: center;
  grid-template-columns: 24px 1fr 100px;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.emp:last-of-type {
  margin-bottom: 14px;
}

.emp label {
  font-weight: 650;
  cursor: pointer;
}

.emp input[type=number] {
  width: 86px;
}

.tag {
  display: inline-block;
  vertical-align: middle;
  color: var(--pine);
  background: var(--mint);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: .77rem;
  font-weight: 650;
}

.tag.warn,.warning {
  color: #75401e;
  background: var(--warn);
}

.callout {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px 15px;
  margin: 12px 0;
}

.warning {
  border-color: #dac5a5;
}

.bad {
  color: var(--error);
  background: #f8e9e5;
  border-color: #dec0b8;
}

.note {
  background: #ecf1e8;
}

.inline-note {
  margin: .6em 0;
}

.actions {
  margin-top: 15px;
}

.head .actions,.sectionhead .actions {
  margin: 0;
}

.formgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(200px,100%),1fr));
  gap: 13px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.field>span,.field>label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--sub);
}

input:not([type=checkbox]),select,textarea {
  border: 1px solid #aebbb0;
  border-radius: 4px;
  background: white;
  color: var(--ink);
  padding: .5rem .6rem;
  min-height: 38px;
  min-width: 0;
  max-width: 100%;
}

input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--pine);
  vertical-align: middle;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
}

.field input,.field select {
  width: 100%;
}

.scroll {
  overflow: auto;
  max-width: 100%;
  scrollbar-color: #9cae9f var(--paper);
}

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: .91rem;
}

td,th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-weight: 620;
  background: #ebeee7;
  color: #405448;
  font-size: .79rem;
  white-space: nowrap;
}

td:first-child,th:first-child {
  padding-left: 10px;
}

tbody tr:hover {
  background: #f2f5ed;
}

td button {
  font-size: .82rem;
  min-height: 32px;
  padding: 5px 9px;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

summary {
  font-weight: 600;
  cursor: pointer;
}

details .scroll {
  margin: 10px 0;
}

.compact {
  font-size: .84rem;
}

.data {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 75ch;
}

.metric {
  min-width: 95px;
}

.metric strong {
  display: block;
  font-size: .9rem;
}

progress {
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  accent-color: var(--pine);
  background: var(--mint);
  margin: 4px 0;
}

progress::-webkit-progress-bar {
  background: var(--mint);
  border-radius: 6px;
}

progress::-webkit-progress-value {
  background: var(--pine);
  border-radius: 6px;
}

.spread {
  color: var(--sub);
  font-size: .83rem;
}

.pair {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
}

.login {
  max-width: 420px;
  margin: 8vh auto;
  padding: 30px;
}

.login h1 {
  font-size: 2rem;
  margin-bottom: 24px;
}

.login .field {
  margin-bottom: 12px;
}

.login button {
  width: 100%;
}

dialog {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  max-width: min(94vw,760px);
  max-height: 90vh;
  width: 640px;
  box-shadow: 0 6px 18px #152c212a;
}

dialog::backdrop {
  background: #142e2580;
}

dialog h2 {
  margin-bottom: 18px;
}

dialog>form {
  margin-top: 12px;
}

#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  color: white;
  background: var(--pine);
  border-radius: 5px;
  box-shadow: 0 4px 16px #152c212c;
  z-index: 100;
  max-width: min(95vw,820px);
  white-space: pre-line;
}

#notice.error {
  background: var(--error);
}

[hidden] {
  display: none!important;
}

.space {
  margin-top: 15px;
}

.right {
  margin-left: auto;
}

.flow>*+* {
  margin-top: 14px;
}

.nowrap {
  white-space: nowrap;
}

.tabsline {
  border-bottom: 1px solid var(--line);
  margin: 18px 0;
}

@media(max-width:850px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(3,1fr);
  }
  .stat {
    border: 0!important;
  }
  .bar,.nav,main {
    width: calc(100% - 32px);
  }
  .nav {
    gap: 19px;
  }
  .identity .role {
    display: none;
  }
  .sheet {
    padding: 17px;
  }
}

@media(max-width:550px) {
  main {
    padding-top: 22px;
  }
  .bar {
    min-height: 59px;
    gap: 7px;
  }
  .brand {
    gap: 6px;
  }
  .brand b {
    font-size: 1.12rem;
  }
  .brand span:last-child {
    font-size: .63rem;
  }
  .mark {
    width: 22px;
    height: 24px;
  }
  .identity {
    gap: 4px;
  }
  .identity .loginname {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(3,1fr);
  }
  .stat {
    padding: 10px;
  }
  .stat strong {
    font-size: 1.55rem;
  }
  .stat span {
    font-size: .74rem;
  }
  .head {
    align-items: start;
  }
  .toolbar>* {
    max-width: 100%;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .emp {
    grid-template-columns: 20px 1fr 80px;
    gap: 7px;
  }
  .nav {
    font-size: .89rem;
  }
  .sheet {
    padding: 15px;
  }
  .head .actions {
    margin-top: 4px;
  }
  .subnav {
    gap: 2px 12px;
  }
  .login {
    margin: 5vh auto;
  }
  td,th {
    padding: 8px;
  }
  .actions {
    gap: 7px;
  }
}

