@font-face {
  font-family: Rubik;
  src: url("branding/rubik-400.woff2");
}
@font-face {
  font-family: Rubik;
  src: url("branding/rubik-500.woff2");
  font-weight: 500;
}
@font-face {
  font-family: Rubik;
  src: url("branding/rubik-700.woff2");
  font-weight: 700;
}
:root {
  --navy: #17324f;
  --canvas: #f7f8fa;
  --surface: #fff;
  --line: #dce1e6;
  --muted: #53616f;
  --red: #a52d35;
  --blue: #e6edf5;
  --amber: #fff2d7;
  --green: #e1efe5;
  font-family: Rubik, "Segoe UI", sans-serif;
  color: var(--navy);
  background: var(--canvas);
  font-synthesis: none;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--navy);
  text-underline-offset: 4px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--navy);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  line-height: 1.3;
}
button:hover,
.button:hover {
  background: var(--blue);
  border-color: #b9c3cd;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.primary:hover {
  background: #294d70;
  color: white;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #b9c3cd;
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--navy);
  background: white;
  min-height: 43px;
}
textarea {
  resize: vertical;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--navy);
  flex-shrink: 0;
}
label {
  display: block;
  font-weight: 500;
  font-size: 0.87rem;
  margin-bottom: 15px;
}
label > input,
label > select,
label > textarea {
  margin-top: 7px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #6386a8;
  outline-offset: 3px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  line-height: 1.5;
}
.check input {
  margin-top: 2px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(1.9rem, 3.3vw, 2.8rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.045em;
  margin-bottom: 10px;
  color: #142b45;
}
h2 {
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
h3 {
  font-size: 1.05rem;
  line-height: 1.4;
}
p {
  line-height: 1.65;
  margin-bottom: 15px;
}
small,
.small {
  font-size: 0.8rem;
  line-height: 1.6;
}
small {
  display: block;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.sidebar {
  width: 240px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--navy);
  color: white;
  padding: 29px 20px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  color: white;
  text-decoration: none;
  font-size: 2rem;
  letter-spacing: -0.045em;
  font-weight: 500;
  padding: 0 8px 28px;
  border-bottom: 1px solid #ffffff30;
}
.brand span {
  display: block;
  font-size: 1.08rem;
  color: #ccd8e4;
  letter-spacing: 0;
  font-weight: 400;
  margin-top: 5px;
}
nav {
  display: grid;
  gap: 9px;
  margin-top: 28px;
}
nav a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 13px 14px;
  border-radius: 6px;
  border-left: 4px solid transparent;
}
nav a span {
  font-size: 1.5rem;
}
nav a.active,
nav a:hover {
  background: #ffffff15;
}
nav a.active {
  border-left-color: var(--red);
  font-weight: 500;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 30px 8px 0;
}
.sidebar-bottom p {
  border-top: 1px solid #ffffff30;
  padding-top: 18px;
  font-size: 0.85rem;
}
.sidebar-bottom small {
  color: #ccd8e4;
}
.sidebar-logout {
  color: white;
  border-color: #ffffff30;
  background: transparent;
  min-height: 35px;
  font-size: 0.8rem;
}
.shell {
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.shell.standalone {
  margin-left: 0;
}
.topbar {
  height: 65px;
  display: flex;
  gap: 25px;
  align-items: center;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  background: #ffffff60;
}
.topbar a {
  align-self: stretch;
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 500;
  position: relative;
}
.topbar a:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red);
  border-radius: 3px 3px 0 0;
}
main {
  padding: 35px 34px;
  flex: 1;
  min-width: 0;
  outline: 0;
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0 34px;
  padding: 21px 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}
.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metrics > div {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 18px 20px;
}
.metrics span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 0.88rem;
}
.metrics strong {
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}
.metrics strong small {
  display: inline;
  font-size: 0.9rem;
  font-weight: 400;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 25px;
  margin-bottom: 22px;
}
.project-list {
  padding: 0;
  overflow: hidden;
}
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.table-toolbar label {
  margin: 0;
  flex: 1;
}
.table-toolbar input {
  max-width: 500px;
  margin: 0;
  background: var(--canvas);
}
.table-toolbar select {
  width: auto;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}
th {
  background: #f3f6fa;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.71rem;
  letter-spacing: 0.045em;
  font-weight: 500;
  padding: 15px 20px;
}
td {
  border-top: 1px solid var(--line);
  padding: 20px;
  vertical-align: middle;
}
.project-link {
  font-weight: 500;
  text-decoration: none;
}
.project-link:hover {
  text-decoration: underline;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 0.76rem;
  line-height: 1.4;
}
.amber {
  background: var(--amber);
  color: #83520e;
}
.neutral {
  background: #edf0f4;
  color: #465768;
}
.green {
  background: var(--green);
  color: #236344;
}
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.two-column .panel {
  margin: 0;
}
.workflow {
  list-style: none;
  counter-reset: steps;
  padding: 0;
  margin: 0;
}
.workflow li {
  position: relative;
  padding: 0 0 23px 45px;
  counter-increment: steps;
}
.workflow li:before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf0f4;
  font-size: 0.85rem;
}
.workflow li:not(:last-child):after {
  content: "";
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: 3px;
  border-left: 1px solid var(--line);
}
.workflow li:last-child {
  padding-bottom: 0;
}
.workflow b {
  font-weight: 500;
  display: block;
  margin-bottom: 5px;
}
.workflow span {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.5;
  display: block;
}
.notice {
  padding: 15px 17px;
  background: var(--amber);
  border: 1px solid #f0d7a8;
  border-radius: 7px;
  color: #80500d;
}
.empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--muted);
}
.empty h2 {
  color: var(--navy);
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.full {
  width: 100%;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 85px;
  align-items: center;
  max-width: 1080px;
  margin: 10vh auto;
}
.login-layout h1 {
  font-size: 4rem;
}
.byline {
  display: block;
  font-size: 1.4rem;
  letter-spacing: 0;
  margin-top: 10px;
}
.intro {
  font-size: 1.7rem;
  margin-top: 38px;
}
.login-panel {
  padding: 35px;
}
.login-panel h2 {
  font-size: 1.65rem;
}
.login-line {
  display: flex;
  gap: 16px;
  padding-top: 20px;
  font-size: 0.87rem;
}
.error-panel {
  max-width: 700px;
  margin: 50px auto;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  width: min(560px, calc(100% - 32px));
  max-height: 90vh;
  overflow: auto;
  color: var(--navy);
  box-shadow: 0 24px 80px #17324f30;
}
dialog::backdrop {
  background: #142b4577;
  backdrop-filter: blur(2px);
}
.wide-dialog {
  width: min(900px, calc(100% - 32px));
}
.dialog-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.dialog-heading {
  margin-bottom: 20px;
}
.dialog-heading h2 {
  margin: 7px 0;
}
.dialog-heading button {
  min-width: 37px;
  min-height: 37px;
  padding: 5px;
  font-size: 1.3rem;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.stack {
  margin-top: 20px;
}
.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 23px;
}
.offers-column,
.project-inspector {
  min-width: 0;
}
.project-inspector .panel {
  padding: 20px;
}
.project-inspector h2 {
  font-size: 1.05rem;
}
.back {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 14px;
  text-decoration: none;
}
.measure {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.measure b {
  font-size: 0.9rem;
  font-weight: 500;
}
.measure:last-child {
  padding-bottom: 0;
}
.offer {
  padding: 22px 0;
}
.offer > .section-heading,
.offer > .import-review,
.offer > .offer-actions {
  margin: 0 22px 18px;
}
.section-heading h2 {
  margin-bottom: 7px;
}
.section-heading p {
  margin: 0;
}
.section-heading > a {
  font-size: 0.8rem;
  white-space: nowrap;
}
.positions td {
  padding: 16px 12px;
  font-size: 0.8rem;
}
.positions th {
  padding: 12px;
}
.positions td button {
  font-size: 0.75rem;
  padding: 7px 9px;
  min-height: 33px;
  margin: 3px;
}
.position-title {
  display: flex;
  gap: 9px;
  min-width: 190px;
  max-width: 330px;
  align-items: flex-start;
}
.position-title input {
  margin-top: 4px;
}
.position-title b {
  display: block;
  line-height: 1.5;
  font-weight: 500;
}
.position-title small {
  margin-bottom: 4px;
}
.allocation-label,
.question {
  display: block;
  font-size: 0.72rem;
  margin-top: 6px;
  line-height: 1.4;
}
.question {
  color: #83520e;
}
.allocation-label {
  color: var(--muted);
}
.nowrap {
  white-space: nowrap;
}
.selection-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  font-size: 0.8rem;
  background: #f7f9fb;
  flex-wrap: wrap;
}
.selection-bar label {
  margin: 0;
  font-size: 0.8rem;
}
.selection-bar button {
  margin-left: auto;
  font-size: 0.8rem;
}
.offer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 20px;
}
.import-review {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 15px;
}
.import-review .notice {
  margin: 12px 0;
}
.import-review label {
  font-size: 0.8rem;
}
.import-review .stack {
  max-width: 520px;
}
details > summary {
  cursor: pointer;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 12px;
}
details:not([open]) > summary {
  margin-bottom: 0;
}
.hash {
  overflow-wrap: anywhere;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--muted);
}
.source-review {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.reference-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin: 25px 0;
  font-size: 0.85rem;
}
.source-review form {
  max-width: 680px;
}
.source {
  margin-top: 20px;
}
.split-editor {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 13px;
}
.split-editor .form-grid {
  grid-template-columns: 2fr 1fr;
}
.split-editor textarea {
  min-height: 74px;
}
.split-editor button {
  font-size: 0.8rem;
}
.allocation-item {
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 18px;
}
.preserve {
  white-space: pre-wrap;
}
.correction-row {
  border: 1px solid var(--line);
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 7px;
}
.correction-row .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.correction-row label {
  font-size: 0.8rem;
}
.print-row {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  break-inside: avoid;
}
.print-row p {
  font-size: 0.9rem;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 15px;
  top: 15px;
  background: white;
  padding: 15px;
  z-index: 100;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
[hidden] {
  display: none !important;
}
#toast {
  position: fixed;
  bottom: 20px;
  right: 24px;
  max-width: min(600px, 90vw);
  background: var(--navy);
  color: white;
  padding: 16px 22px;
  border-radius: 8px;
  z-index: 30;
  box-shadow: 0 12px 40px #17324f30;
}
.save-error {
  color: #a1293d;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
code {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}
@media (min-width: 1700px) {
  main {
    max-width: 1600px;
    width: 100%;
    margin: auto;
  }
}
@media (max-width: 1250px) {
  .sidebar {
    width: 210px;
    padding: 26px 15px;
  }
  .brand {
    font-size: 1.75rem;
  }
  .shell {
    margin-left: 210px;
  }
  .project-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .project-inspector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .metrics > div {
    padding: 15px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading > .actions {
    max-width: 310px;
    justify-content: flex-end;
  }
  .login-layout {
    gap: 35px;
  }
  .login-layout h1 {
    font-size: 3rem;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 17px 20px;
    display: block;
  }
  .brand {
    font-size: 1.7rem;
    border: 0;
    padding: 0;
    display: block;
  }
  .brand span {
    display: inline;
    font-size: 0.83rem;
    margin-left: 9px;
  }
  .sidebar nav {
    display: flex;
    gap: 6px;
    overflow: auto;
    margin-top: 17px;
  }
  .sidebar nav a {
    white-space: nowrap;
    padding: 8px;
    font-size: 0.8rem;
    gap: 6px;
  }
  .sidebar nav a span {
    font-size: 1.2rem;
  }
  .sidebar-bottom {
    display: none;
  }
  .shell {
    margin-left: 0;
  }
  .topbar {
    height: 47px;
    padding: 0 20px;
    gap: 16px;
    font-size: 0.73rem;
  }
  main {
    padding: 25px 18px;
  }
  .page-heading {
    display: block;
    margin-bottom: 23px;
  }
  .page-heading > button,
  .page-heading > .actions {
    margin-top: 17px;
    max-width: none;
    justify-content: flex-start;
  }
  .page-heading p {
    font-size: 0.9rem;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .metrics span {
    font-size: 0.76rem;
  }
  .metrics strong {
    font-size: 1.4rem;
  }
  .metrics > div {
    padding: 14px;
  }
  .two-column,
  .project-inspector,
  .login-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .panel {
    padding: 20px;
  }
  .project-list {
    padding: 0;
  }
  th,
  td {
    padding: 14px;
  }
  .project-list table {
    min-width: 670px;
  }
  .table-toolbar {
    padding: 14px;
  }
  .table-toolbar input {
    max-width: none;
  }
  .table-toolbar button {
    font-size: 0.78rem;
  }
  .project-inspector .panel {
    margin: 0;
  }
  .offers-column .offer {
    padding: 18px 0;
  }
  .offer .section-heading {
    display: block;
  }
  .offer .section-heading > a {
    display: block;
    margin-top: 12px;
  }
  .selection-bar {
    padding: 12px;
    gap: 8px;
  }
  .selection-bar button {
    margin-left: 0;
  }
  .positions {
    min-width: 660px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .correction-row .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .login-layout {
    margin: 20px auto;
  }
  .login-layout h1 {
    font-size: 3rem;
  }
  .intro {
    font-size: 1.35rem;
    margin-top: 22px;
  }
  .login-panel {
    padding: 24px;
  }
  .login-line {
    font-size: 0.8rem;
  }
  .project-description {
    font-size: 0.85rem;
  }
  footer {
    margin: 0 18px;
    display: block;
    font-size: 0.7rem;
  }
  footer span {
    display: block;
    margin-bottom: 7px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  dialog {
    padding: 21px;
  }
  .reference-links {
    gap: 12px;
    font-size: 0.8rem;
  }
}
@media print {
  .sidebar,
  .topbar,
  footer,
  .no-print,
  button,
  .skip,
  #toast {
    display: none !important;
  }
  .shell {
    margin: 0;
  }
  main {
    padding: 0;
  }
  .panel {
    border: 0;
    padding: 0;
  }
  .page-heading {
    margin-bottom: 20px;
  }
  body {
    background: white;
    color: #111;
  }
  a {
    color: #111;
    text-decoration: none;
  }
  h1 {
    font-size: 24px;
  }
  .print-row {
    break-inside: avoid;
  }
  .hash {
    font-size: 9px;
  }
}

@media (max-width: 760px) {
  .sidebar nav {
    flex-wrap: wrap;
    overflow: visible;
  }
  .sidebar nav a {
    font-size: 0.76rem;
  }
  .sidebar-bottom {
    display: flex;
    padding: 10px 0 0;
    justify-content: flex-end;
  }
  .sidebar-bottom p {
    display: none;
  }
  .sidebar-logout {
    font-size: 0.72rem;
    padding: 5px 10px;
    min-height: 32px;
  }
}
