@font-face {
  font-family: InterVariable;
  src: url("/assets/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f6f5f0;
  --surface: #fffefa;
  --ink: #262a24;
  --muted: #6b7066;
  --line: rgba(38, 42, 36, 0.12);
  --accent: #a5442f;
  --accent-hover: #8c3523;
  --soft: #f3e7df;
  --sidebar: #242b25;
  --radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    400 14px/1.55 InterVariable,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
body[data-kind="grader"] {
  --accent: #3150a3;
  --accent-hover: #243f89;
  --soft: #e8edf8;
  --sidebar: #1f2637;
  --paper: #f4f5f8;
  --surface: #fff;
}
body[data-kind="facility"] {
  --accent: #27664f;
  --accent-hover: #1a4d39;
  --soft: #e4eee7;
  --sidebar: #1b3028;
  --paper: #f3f6f2;
  --surface: #fff;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button,
.button {
  min-height: 36px;
  border-radius: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  transition: transform 160ms var(--ease);
}
button:active:not(:disabled),
.button:active {
  transform: scale(0.98);
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.primary:hover {
  background: var(--accent-hover);
}
.secondary {
  background: var(--soft);
  border-color: transparent;
}
.plain {
  border-color: transparent;
}
.small {
  min-height: 30px;
  padding: 4px 9px;
}
.danger {
  color: #a0372a;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: -1px;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
textarea {
  min-height: 130px;
  resize: vertical;
}
input[type="file"] {
  padding: 9px;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}
label {
  display: grid;
  gap: 7px;
  font-weight: 600;
}
label small {
  font-weight: 400;
  color: var(--muted);
}
form {
  display: grid;
  gap: 18px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 {
  font-size: 34px;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 17px;
}
p {
  text-wrap: pretty;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 13px;
}
.starting {
  min-height: 100dvh;
  display: grid;
  place-content: center;
}
.skip {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 50;
  background: var(--surface);
  padding: 12px;
}
.skip:focus {
  top: 16px;
}
.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  isolation: isolate;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 32px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: var(--sidebar);
  color: #f5f5ec;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 14px;
}
.brand strong {
  font-size: 25px;
  letter-spacing: -0.06em;
  font-weight: 600;
}
.brand small {
  color: #b9c2b6;
  font-size: 12px;
}
nav {
  display: grid;
  gap: 4px;
}
.navlink {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 8px;
  color: #bdc4bd;
  font-weight: 600;
}
.navlink:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.navlink[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}
.sidebar-foot {
  display: grid;
  gap: 16px;
  margin-top: auto;
  padding: 0 14px;
}
.sidebar-foot p {
  color: #bbc4b8;
  font-size: 12px;
}
.sidebar-foot button {
  border-color: rgba(255, 255, 255, 0.2);
  color: #eef3ea;
}
.workspace {
  min-width: 0;
}
.topbar {
  min-height: 76px;
  padding: 18px 36px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}
.topbar .context {
  min-width: 0;
}
.topbar strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.topbar small {
  display: block;
}
.account {
  display: flex;
  gap: 15px;
  align-items: center;
}
.account strong {
  font-size: 13px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.connection {
  font-size: 12px;
  color: var(--muted);
}
.connection[data-online="false"] {
  color: #a03b25;
}
.mobile-toggle {
  display: none;
}
main.content {
  max-width: 1550px;
  margin: 0 auto;
  padding: 34px 36px 64px;
  display: grid;
  gap: 28px;
}
main.content > *,
.dialog-body > *,
#list-results {
  min-width: 0;
}
.page-title {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.page-title > div {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.page-title p {
  max-width: 70ch;
  color: var(--muted);
}
.page-title button {
  flex-shrink: 0;
}
.metrics-wrap {
  container-type: inline-size;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metric {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 0 22px;
  border-left: 1px solid var(--line);
}
.metric:first-child {
  padding-left: 0;
  border-left: 0;
}
.metric:last-child {
  padding-right: 0;
}
.metric p {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric strong {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.metric small {
  font-size: 12px;
}
@container (max-width: 620px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 24px 0;
  }
  .metric {
    padding: 0 16px;
  }
  .metric:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  .metric:nth-child(2) {
    padding-right: 0;
  }
}
.section-title {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}
.section-title a {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}
.stack {
  display: grid;
  gap: 20px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  gap: 32px;
  align-items: start;
}
.worklist {
  display: grid;
}
.workitem {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.workitem > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}
.workitem h3 {
  font-size: 15px;
  letter-spacing: -0.02em;
}
.workitem p {
  color: var(--muted);
}
.workitem button {
  flex-shrink: 0;
}
.panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 17px;
}
.panel p {
  color: var(--muted);
}
.panel h3 {
  font-size: 16px;
}
.intro-note {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--soft);
  border-radius: 10px;
}
.intro-note p {
  max-width: 90ch;
}
.toolbar {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar input {
  max-width: 360px;
}
.toolbar select {
  width: auto;
  max-width: 200px;
}
.toolbar label {
  display: flex;
  gap: 10px;
  align-items: center;
}
.table-scroll {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th:first-child,
td:first-child {
  padding-left: 0;
}
th:last-child,
td:last-child {
  padding-right: 0;
}
th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
td {
  font-size: 14px;
}
td strong {
  font-weight: 600;
}
td .sub {
  color: var(--muted);
  font-size: 12px;
  display: block;
}
td.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td.actions {
  white-space: nowrap;
  text-align: right;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  color: #4a5548;
  background: #e9ece4;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tag.good {
  background: #deede3;
  color: #22613d;
}
.tag.warn {
  background: #faedcc;
  color: #825c08;
}
.tag.bad {
  background: #f7e0db;
  color: #983725;
}
.tag.info {
  background: #e4eaf6;
  color: #315295;
}
.empty {
  padding: 52px 20px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}
.empty p {
  max-width: 50ch;
  color: var(--muted);
}
.countline {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.countline div {
  display: flex;
  gap: 8px;
}
.matches {
  display: grid;
  gap: 12px;
}
.match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.match > div {
  display: grid;
  gap: 4px;
}
.match strong {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.match small {
  max-width: 40ch;
}
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.board-column {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}
.board-column h2 {
  font-size: 15px;
}
.ticket-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  text-align: left;
  white-space: normal;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 400;
}
.ticket-card h3 {
  font-size: 16px;
}
.ticket-card p {
  font-size: 13px;
  color: var(--muted);
}
.ticket-card .tag {
  justify-self: start;
}
.ticket-card:hover {
  border-color: var(--accent);
}
.progress-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 50px;
  gap: 18px;
  align-items: center;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}
.error {
  border-radius: 8px;
  background: #f9e7e1;
  color: #8f3525;
  padding: 12px 14px;
}
.warning {
  background: #f9efd2;
  color: #71500c;
  border-radius: 8px;
  padding: 12px 14px;
}
.success {
  background: #e2eee4;
  color: #265d3d;
  border-radius: 8px;
  padding: 12px 14px;
}
.emergency {
  border-left: 3px solid #ac3c25;
  padding: 12px 16px;
  background: #fae7e0;
  color: #88301e;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 9px;
}
.checklabel {
  display: flex;
  gap: 10px;
  align-items: center;
}
.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #fff;
}
.auth-story {
  padding: 42px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: var(--sidebar);
  color: #faf6ed;
}
.auth-story .brand {
  padding: 0;
}
.auth-story img {
  width: 100%;
  min-height: 230px;
  max-height: 390px;
  object-fit: cover;
  object-position: 62% 50%;
  border-radius: 16px;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}
.auth-copy {
  display: grid;
  gap: 15px;
  padding: 0 2px 5px;
}
.auth-copy h1 {
  max-width: 14ch;
  font-size: 42px;
  letter-spacing: -0.055em;
}
.auth-copy p {
  max-width: 48ch;
  color: #c6d0c3;
}
.auth-form {
  display: grid;
  place-content: center;
  padding: 42px 24px;
  gap: 28px;
}
.auth-inner {
  width: 320px;
  max-width: 100%;
  display: grid;
  gap: 24px;
}
.auth-inner h2 {
  font-size: 28px;
}
.auth-inner .auth-heading {
  display: grid;
  gap: 8px;
}
.auth-inner form button.primary {
  min-height: 44px;
}
.password-field {
  display: flex;
  gap: 8px;
  align-items: center;
}
.password-field input {
  min-width: 0;
  flex: 1;
}
.auth-switch {
  text-align: center;
  color: var(--muted);
}
.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}
dialog {
  border: 0;
  padding: 0;
  width: min(740px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  color: var(--ink);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 200ms var(--ease),
    transform 200ms var(--ease),
    overlay 200ms allow-discrete,
    display 200ms allow-discrete;
}
dialog::backdrop {
  background: rgba(15, 23, 18, 0.45);
}
@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scale(0.97);
  }
}
.dialog-head {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 22px;
}
.dialog-body {
  padding: 24px 28px 28px;
  display: grid;
  gap: 22px;
}
.dialog-body p {
  max-width: 72ch;
}
.dialog-body .details {
  display: grid;
  gap: 10px;
}
.details dl {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  margin: 0;
  gap: 10px;
}
.details dt {
  color: var(--muted);
}
.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--paper);
  padding: 18px;
  border-radius: 8px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 13px;
}
.proof-photo {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 10px;
}
.criterion {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.criterion .form-grid {
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: start;
}
.criterion blockquote {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--paper);
  white-space: pre-wrap;
  font-size: 13px;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: min(450px, calc(100vw - 32px));
  background: var(--ink);
  color: #f9f9f4;
  padding: 13px 18px;
  border-radius: 10px;
  z-index: 100;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 200ms var(--ease),
    transform 200ms var(--ease);
}
.toast[data-open="true"] {
  opacity: 1;
  transform: translateY(0);
}
#mobile-menu {
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  width: min(320px, 90vw);
  border-radius: 0;
  background: var(--sidebar);
  color: #fff;
}
#mobile-menu .dialog-body {
  padding: 22px;
}
.mobile-brand {
  padding: 12px 14px 20px;
  font-size: 24px;
  font-weight: 600;
}
.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wrap {
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-story {
    padding: 28px;
  }
  .auth-copy h1 {
    font-size: 35px;
  }
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  body {
    font-size: 16px;
  }
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    display: none;
  }
  .mobile-toggle {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
  .topbar {
    padding: 14px 20px;
    gap: 12px;
  }
  .topbar .context small {
    font-size: 12px;
  }
  .topbar .account strong {
    display: none;
  }
  .topbar .account {
    gap: 0;
  }
  main.content {
    padding: 25px 20px 52px;
    gap: 24px;
  }
  h1 {
    font-size: 28px;
  }
  h2 {
    font-size: 21px;
  }
  .page-title {
    align-items: start;
    flex-wrap: wrap;
    gap: 14px;
  }
  .page-title p {
    font-size: 16px;
  }
  button,
  .button {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 16px;
  }
  button.small {
    min-height: 38px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
    min-height: 46px;
  }
  .metric p {
    font-size: 14px;
  }
  .metric strong {
    font-size: 26px;
  }
  .metric small {
    font-size: 13px;
  }
  td,
  th {
    padding: 15px 12px;
  }
  td {
    font-size: 16px;
  }
  th {
    font-size: 14px;
  }
  .tag {
    font-size: 14px;
  }
  .workitem {
    flex-wrap: wrap;
  }
  .workitem h3 {
    font-size: 17px;
  }
  .workitem > div {
    flex-basis: 200px;
  }
  .board {
    grid-template-columns: 1fr;
  }
  .match {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .match strong {
    font-size: 24px;
  }
  .intro-note {
    flex-wrap: wrap;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 24px;
    gap: 18px;
  }
  .auth-story img {
    display: none;
  }
  .auth-copy h1 {
    font-size: 29px;
    max-width: 25ch;
  }
  .auth-copy p {
    display: none;
  }
  .auth-form {
    padding: 32px 24px 48px;
  }
  .auth-inner {
    width: 100%;
    max-width: 360px;
  }
  .auth-story .brand strong {
    font-size: 22px;
  }
  .dialog-head {
    padding: 18px 20px;
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog-head h2 {
    font-size: 20px;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar input {
    max-width: none;
  }
  .progress-row {
    grid-template-columns: 100px minmax(0, 1fr) 46px;
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* keep imported decisions separate from the suggestion queue */
.allocation-history {
  margin-top: 40px;
}
.auth-story small.muted {
  color: #bdc8c1;
}
