@font-face {
  font-family: TolsenGeist;
  src: url('../assets/type/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: TolsenMono;
  src: url('../assets/type/plex-mono.woff2') format('woff2');
  font-display: swap;
}
.to-portal {
  --to-ink: #181914;
  --to-amber: #ffa816;
  --to-muted: #51564e;
  --to-line: #d9d8cd;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #4b504c;
  border-radius: 12px;
  background: #f6f5ed;
  color: var(--to-ink);
  color-scheme: light;
  font:
    450 15px/1.48 TolsenGeist,
    Arial,
    sans-serif;
  text-align: left;
  box-shadow: 0 22px 54px #030d1434;
}
.to-portal * {
  box-sizing: border-box;
}
.to-portal :is(input, textarea, button) {
  font: inherit;
  color: inherit;
}
.to-portal :is(input, textarea, button, summary):focus-visible {
  outline: 3px solid #087482;
  outline-offset: 2px;
}
.to-portal button,
.to-portal summary {
  cursor: pointer;
}
.to-portal button:disabled {
  cursor: default;
}
.to-portal .to-mast {
  position: static;
  display: flex;
  align-items: center;
  gap: clamp(15px, 2.8vw, 42px);
  min-height: 94px;
  padding: 18px clamp(18px, 3vw, 44px);
  background: #121513;
  border-bottom: 4px solid var(--to-amber);
  color: #fff;
}
.to-logo {
  display: block;
  width: 131px;
  height: auto;
  object-fit: contain;
  mix-blend-mode: lighten;
}
.to-identity {
  border-left: 1px solid #565950;
  padding-left: clamp(14px, 2.4vw, 34px);
}
.to-portal .to-label {
  display: block;
  margin: 0;
  color: #6a6559;
  font:
    560 10px/1.45 TolsenMono,
    monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.to-identity .to-label {
  color: #ffd182;
}
.to-identity h2 {
  color: #fff;
  font-size: clamp(20px, 2.35vw, 35px);
  font-weight: 630;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin: 3px 0 0;
}
.to-mast-count {
  margin-left: auto;
  flex: none;
  padding: 7px 12px;
  border-radius: 3px;
  background: #2e3028;
  color: #ffdc96;
  font:
    500 12px/1.2 TolsenMono,
    monospace;
}
.to-body {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.62fr) minmax(252px, 1fr);
  gap: clamp(18px, 3.8vw, 54px);
  padding: clamp(22px, 3vw, 44px);
}
.to-lines {
  min-width: 0;
}
.to-lines > h3 {
  margin: 5px 0 7px;
  font-size: clamp(27px, 3.25vw, 48px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.05;
  text-wrap: balance;
}
.to-lead {
  margin: 0 0 22px;
  max-width: 50ch;
  color: var(--to-muted);
  font-size: 0.92rem;
}
.to-guide {
  display: grid;
  grid-template-columns: 1fr 96px;
  padding: 7px 0;
  border-top: 1px solid var(--to-line);
  border-bottom: 1px solid var(--to-line);
  font:
    500 10px/1.4 TolsenMono,
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #665f50;
}
.to-line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 61px 29px;
  align-items: center;
  gap: 7px;
  min-height: 76px;
  border-bottom: 1px solid var(--to-line);
}
.to-thumb {
  display: grid;
  place-items: center;
  width: 68px;
  height: 52px;
  padding: 3px 5px;
  border-radius: 3px;
  background: #fff;
}
.to-thumb img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.to-product strong,
.to-product small {
  display: block;
}
.to-product strong {
  font-size: 15px;
  line-height: 1.22;
  letter-spacing: -0.018em;
  font-weight: 610;
}
.to-product small {
  margin-top: 4px;
  font:
    500 11px/1.3 TolsenMono,
    monospace;
  color: #716c5d;
}
.to-portal .to-qty {
  appearance: auto;
  width: 100%;
  min-width: 0;
  padding: 7px 4px;
  border: 1px solid #aaa99d;
  border-radius: 4px;
  background: #fff;
  text-align: center;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  min-height: 40px;
}
.to-remove {
  width: 29px;
  min-height: 42px;
  font-size: 22px !important;
  color: #685f52 !important;
  border: 0;
  background: none;
}
.to-remove:hover {
  color: #8e2721 !important;
}
.to-read-qty {
  grid-column: span 2;
  justify-self: center;
  font:
    500 14px/1.3 TolsenMono,
    monospace;
}
.to-empty {
  margin: 0;
  padding: 24px 16px;
  background: #ecece1;
  border: 1px dashed #bcbdb0;
  border-radius: 4px;
  color: #575e52;
  font-size: 14px;
}
.to-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.to-portal .to-primary,
.to-portal .to-outline,
.to-portal .to-link {
  min-height: 43px;
  padding: 9px 16px;
  border-radius: 4px;
  font-weight: 630;
  font-size: 14px;
}
.to-primary {
  color: #1b180e !important;
  background: var(--to-amber);
  border: 1px solid #c77d07;
}
.to-primary:enabled:hover {
  background: #ffbb43;
}
.to-primary:disabled {
  background: #dddcd1;
  color: #74766a !important;
  border-color: #c4c4ba;
}
.to-link {
  background: transparent;
  border: 1px solid transparent;
  color: #393e34 !important;
}
.to-link:hover {
  text-decoration: underline;
}
.to-outline {
  width: 100%;
  background: white;
  border: 1px solid #a8a99d;
}
.to-outline:hover {
  border-color: #514d41;
  background: #fffaf0;
}
.to-side {
  display: grid;
  gap: 15px;
  min-width: 0;
}
.to-quick,
.to-ticket {
  background: #fffefa;
  border: 1px solid var(--to-line);
  border-radius: 5px;
  padding: clamp(15px, 1.8vw, 27px);
}
.to-quick h3 {
  margin: 0 0 11px;
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.035em;
}
.to-quick label {
  display: block;
  margin: 0 0 5px;
  font-size: 13px;
  font-weight: 600;
}
.to-portal .to-codes {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #a8ab9f;
  border-radius: 3px;
  resize: vertical;
  font:
    13px/1.45 TolsenMono,
    monospace;
}
.to-hint,
.to-scope {
  font-size: 12px;
  line-height: 1.45;
  color: var(--to-muted);
}
.to-hint {
  margin: 3px 0 10px;
}
.to-catalogue {
  border-top: 1px solid var(--to-line);
  margin-top: 13px;
  padding-top: 7px;
}
.to-catalogue summary {
  font-size: 12px;
  font-weight: 570;
  padding: 5px 0;
  color: #4c4e43;
}
.to-catalogue ul {
  list-style: none;
  padding: 0;
  margin: 7px 0 0;
}
.to-catalogue li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 5px;
  padding: 3px 0;
  align-items: baseline;
  font-size: 12px;
}
.to-catalogue code {
  font:
    11px TolsenMono,
    monospace;
  color: #69562f;
}
.to-reference {
  display: block;
  margin: 5px 0 13px;
  color: #1b1b16;
  font:
    570 23px/1.25 TolsenMono,
    monospace;
  letter-spacing: -0.05em;
}
.to-stats {
  margin: 0;
}
.to-stats > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  border-top: 1px solid var(--to-line);
  padding: 7px 0;
}
.to-stats dt,
.to-stats dd {
  margin: 0;
  font-size: 13px;
}
.to-stats dd {
  font:
    560 14px/1.3 TolsenMono,
    monospace;
}
.to-scope {
  margin: 5px 0 0;
}
.to-status {
  margin: 0;
  padding: 0 clamp(18px, 3vw, 44px) 14px;
  color: #3c5646;
  font-size: 13px;
}
.to-status:empty {
  padding: 0;
}
.to-status[data-error='true'] {
  color: #973b1e;
}
.to-portal[data-phase='complete'] .to-ticket {
  border-top: 3px solid var(--to-amber);
}
@media (max-width: 730px) {
  .to-body {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }
  .to-side {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .to-portal[data-phase='review'] .to-side,
  .to-portal[data-phase='complete'] .to-side {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 500px) {
  .to-portal .to-mast {
    padding: 12px;
    gap: 10px;
    min-height: 73px;
  }
  .to-logo {
    width: 84px;
  }
  .to-identity {
    padding-left: 10px;
  }
  .to-identity h2 {
    font-size: 19px;
  }
  .to-identity .to-label {
    font-size: 8px;
  }
  .to-mast-count {
    font-size: 10px;
    padding: 5px;
  }
  .to-body {
    padding: 16px 12px;
    gap: 14px;
  }
  .to-side {
    grid-template-columns: 1fr;
  }
  .to-lead {
    font-size: 13px;
    margin-bottom: 15px;
  }
  .to-line {
    grid-template-columns: 46px minmax(0, 1fr) 42px 25px;
    gap: 5px;
    min-height: 66px;
  }
  .to-thumb {
    width: 44px;
    height: 38px;
    padding: 3px;
  }
  .to-product strong {
    font-size: 13px;
  }
  .to-product small {
    font-size: 10px;
  }
  .to-guide {
    grid-template-columns: 1fr 72px;
  }
  .to-remove {
    width: 25px;
  }
  .to-actions {
    gap: 3px;
  }
  .to-portal .to-primary,
  .to-portal .to-link {
    padding: 8px 11px;
    font-size: 13px;
  }
}
