* {
  box-sizing: border-box;
}
html {
  font:
    16px/1.48 "Inter",
    system-ui,
    sans-serif;
  color: #1c3239;
  background: #f4f6f6;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #c99438;
  outline-offset: 2px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.mark {
  font-family: Georgia, serif;
  font-weight: 400;
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.6rem;
  border: 1px solid #c3ad70;
  border-radius: 2px;
  color: #ead29a;
  background: #193a40;
  font-size: 1.4rem;
}
.frame {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100dvh;
}
aside {
  background: #142f36;
  color: #e5efed;
  padding: 1.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 0;
  height: 100dvh;
}
aside .brand {
  padding: 0 0.45rem;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 0.23rem;
}
.nav {
  border: 0;
  text-align: left;
  padding: 0.64rem 0.8rem;
  color: #cbdad9;
  background: transparent;
  border-radius: 5px;
  font-weight: 500;
}
.nav.sel,
.nav:hover {
  background: #295057;
  color: white;
}
.user {
  margin-top: auto;
  color: #cbdad9;
  font-size: 0.85rem;
  padding: 0.65rem;
}
.user button {
  color: #fff;
  background: none;
  border: 0;
  text-decoration: underline;
  padding: 0.4rem 0;
}
main {
  min-width: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dde4e4;
  background: white;
  padding: 1rem clamp(1rem, 3.5vw, 3rem);
  gap: 1rem;
}
header small {
  color: #52646a;
}
header select {
  width: auto;
  max-width: 60vw;
}
.content {
  max-width: 1440px;
  margin: auto;
  padding: clamp(1rem, 3.5vw, 3rem);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font:
    500 clamp(2rem, 3.6vw, 3rem) / 1.12 Georgia,
    serif;
  letter-spacing: -0.035em;
  color: #153539;
}
h2 {
  font:
    500 1.5rem/1.25 Georgia,
    serif;
}
h3 {
  font-size: 1.03rem;
}
.subtle,
small {
  color: #52666c;
}
.lead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.45rem;
  flex-wrap: wrap;
}
.lead p {
  margin-top: 0.45rem;
}
.period,
.tools {
  display: flex;
  gap: 0.65rem;
  align-items: end;
  flex-wrap: wrap;
}
.period label {
  width: auto;
}
.panel,
.card,
.actionbox {
  background: white;
  border: 1px solid #d9e1e0;
  border-radius: 8px;
}
.panel {
  padding: 1.25rem;
  margin: 1rem 0;
}
.panel h2 {
  margin-bottom: 0.85rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}
.card {
  text-align: left;
  padding: 1.05rem;
  display: flex;
  align-items: start;
  flex-direction: column;
  color: inherit;
  gap: 0.5rem;
}
.card:hover,
.tablebtn:hover {
  border-color: #76958d;
  background: #fafcfb;
}
.card span {
  font-size: 0.88rem;
  color: #52666c;
}
.card strong {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.85rem);
  letter-spacing: -0.04em;
}
.actionbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  margin: 0.8rem 0 1.1rem;
  background: #fbf6e8;
  border-color: #dece9e;
}
.actionbox small {
  display: block;
  color: #71531e;
}
.primary,
.secondary,
.link,
.danger {
  border-radius: 5px;
  font-weight: 550;
  padding: 0.54rem 0.8rem;
}
.primary {
  background: #1d514e;
  color: white;
  border: 1px solid #1d514e;
}
.secondary {
  background: #fff;
  color: #244448;
  border: 1px solid #bccdca;
}
.link {
  background: none;
  border: 0;
  text-decoration: underline;
  color: #155b53;
  padding: 0.15rem;
}
.danger {
  background: #fff;
  color: #872f24;
  border: 1px solid #d5b8b5;
}
.tools {
  margin: 1rem 0;
}
.scroll {
  overflow: auto;
  max-width: 100%;
}
table {
  font-size: 0.9rem;
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
th,
td {
  vertical-align: top;
  text-align: left;
  padding: 0.64rem 0.63rem;
  border-bottom: 1px solid #e1e7e5;
  white-space: nowrap;
}
th {
  background: #f0f4f3;
  font-size: 0.83rem;
  color: #41585e;
}
td.wrap {
  white-space: normal;
  min-width: 8rem;
}
tr.action {
  cursor: pointer;
}
tr.action:hover {
  background: #f1f7f5;
}
.empty {
  padding: 0.8rem 0;
  color: #536a6b;
}
.notice,
fieldset {
  border: 1px solid #d8e1de;
  border-radius: 6px;
  padding: 0.85rem;
  margin: 0.7rem 0;
}
fieldset legend {
  font-weight: 600;
}
.notice {
  background: #eff5f2;
}
.signin {
  max-width: 460px;
  margin: clamp(2rem, 12vh, 9rem) auto;
  padding: 2rem;
  background: white;
  border: 1px solid #d4dfdc;
  border-top: 4px solid #28534c;
  border-radius: 8px;
}
.signin .brand {
  margin-bottom: 2rem;
}
.signin h1 {
  font-size: 2rem;
}
.signin form {
  margin-top: 1.5rem;
}
label {
  display: grid;
  gap: 0.32rem;
  font-size: 0.9rem;
  font-weight: 550;
  margin: 0.45rem 0;
}
input,
select,
textarea {
  border: 1px solid #afc1bd;
  border-radius: 4px;
  background: white;
  color: #1c3439;
  padding: 0.53rem;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}
input[type="checkbox"] {
  width: 1.05rem;
}
select[multiple] {
  min-height: 5rem;
}
textarea {
  min-height: 4.5rem;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
dialog {
  color: inherit;
  border: 1px solid #c6d2ce;
  border-radius: 9px;
  padding: 1.3rem;
  max-width: min(800px, 96vw);
  width: 100%;
  max-height: 92dvh;
}
dialog::backdrop {
  background: #10262c99;
}
.dialoghead {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.dialoghead button {
  flex: none;
}
.twocol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 1rem;
}
.rowfields {
  border-left: 3px solid #bacbc5;
  padding-left: 0.7rem;
  margin: 0.6rem 0;
}
.error {
  color: #943a29;
  white-space: pre-line;
}
.detail {
  display: grid;
  grid-template-columns: minmax(8rem, 30%) 1fr;
  gap: 0.5rem 0.8rem;
}
.detail dt {
  color: #52666c;
}
.detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.detail pre {
  white-space: pre-wrap;
}
.number {
  font-variant-numeric: tabular-nums;
}
.mobile-menu {
  display: none;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 0.8rem 1rem;
  background: #163c3b;
  color: #fff;
  border-radius: 5px;
  z-index: 8;
}
.tag {
  font-size: 0.8rem;
  color: #774e10;
  background: #fff1c7;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
}
.proof {
  border-left: 3px solid #ae913f;
  padding-left: 0.8rem;
}
.compact {
  font-size: 0.86rem;
}
.scroll input {
  width: auto;
}
.issues {
  list-style: none;
  padding: 0;
}
.issues li {
  padding: 0.55rem 0;
  border-bottom: 1px solid #e2e8e6;
}
.printonly {
  display: none;
}
@media (max-width: 780px) {
  .frame {
    display: block;
  }
  aside {
    display: none;
  }
  aside.open {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 3;
    width: 240px;
    box-shadow: 0 0 0 100vw #1235;
  }
  .mobile-menu {
    display: inline-block;
  }
  header {
    padding: 0.7rem 1rem;
  }
  header small {
    display: none;
  }
  .content {
    padding: 1rem;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .card {
    padding: 0.8rem;
  }
  .card strong {
    font-size: 1.13rem;
  }
  .actionbox {
    align-items: start;
  }
  .panel {
    padding: 0.85rem;
  }
  .lead {
    margin-bottom: 0.6rem;
  }
  .signin {
    margin: 8vh 1rem;
  }
  .period input {
    max-width: 9rem;
  }
  .period label {
    font-size: 0.8rem;
  }
}
@media print {
  body {
    background: white;
  }
  aside,
  header,
  .tools,
  .period,
  .dialoghead button,
  #notice,
  .mobile-menu,
  .secondary,
  .primary {
    display: none !important;
  }
  .frame {
    display: block;
  }
  .content {
    padding: 0;
  }
  .scroll {
    overflow: visible;
  }
  dialog[open] {
    position: static;
    max-width: none;
    max-height: none;
    border: 0;
    width: 100%;
  }
  body:has(dialog[open]) #root {
    display: none;
  }
  .printonly {
    display: block;
  }
  th,
  td {
    white-space: normal;
    font-size: 9pt;
  }
  .panel {
    break-inside: avoid;
  }
}
