:root {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: #202622;
  background: #f4f3ed;
  --ink: #1e2824;
  --mute: #59635d;
  --paper: #faf9f4;
  --line: #cdd0c5;
  --orange: #b93612;
  --signal: #ff6a37;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
a {
  color: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.73em 1.15em;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #b6bcb1;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 650;
  line-height: 1.3;
}
button:hover,
.button:hover {
  border-color: #37453d;
  background: #eceee4;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.primary:hover {
  background: #35483b;
  color: white;
}
.action {
  color: var(--orange);
}
:focus-visible {
  outline: 3px solid #e47536;
  outline-offset: 3px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
  padding: 14px clamp(18px, 5vw, 78px);
  gap: 1rem;
  background: var(--paper);
}
.identity {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.identity b {
  font-family: Arial, sans-serif;
  font-size: 1.82rem;
  letter-spacing: -0.09em;
  font-weight: 900;
}
.identity sup {
  font: 10px var(--mono);
  align-self: flex-start;
  margin: 4px 0 0 4px;
}
.identity span {
  border-left: 1px solid var(--line);
  padding-left: 17px;
  margin-left: 17px;
  font-size: 0.9rem;
  font-weight: 550;
}
.mark {
  width: 28px;
  height: 28px;
  background: url(mark.svg) center/cover;
  margin-right: 9px;
}
nav,
.actions,
.tabs,
.line,
.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
nav button,
.tabs button {
  background: transparent;
  border-color: transparent;
}
.tabs {
  border-bottom: 1px solid var(--line);
  gap: 6px;
  margin: 20px 0;
}
.tabs button {
  border-radius: 0;
  padding: 14px 12px;
}
.tabs .active {
  border-bottom: 3px solid var(--orange);
}
nav .active {
  background: #e4e8de;
}
.muted,
small {
  color: var(--mute);
}
small {
  line-height: 1.5;
}
main {
  max-width: 1560px;
  margin: auto;
  padding: clamp(22px, 4vw, 58px) clamp(18px, 5vw, 78px);
  min-height: calc(100svh - 145px);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 4.6vw, 4.8rem);
  font-weight: 550;
  letter-spacing: -0.065em;
  line-height: 1.04;
}
h2 {
  font-size: clamp(1.4rem, 2.4vw, 2.25rem);
  letter-spacing: -0.045em;
  font-weight: 600;
}
h3 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
p {
  line-height: 1.55;
}
footer {
  padding: 20px clamp(18px, 5vw, 78px);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font: 10px var(--mono);
  letter-spacing: 0.08em;
  color: var(--mute);
}
.eyebrow,
.metric-label,
.kicker,
th,
.board-caption {
  font: 600 10px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.eyebrow {
  color: var(--orange);
  margin-bottom: 13px;
}
.title-row,
.section-head,
.dialog-title,
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.title-row {
  margin-bottom: 25px;
}
.title-row p {
  margin-top: 10px;
}
.section-head {
  margin: 27px 0 14px;
}
.board {
  min-height: 290px;
  background: #172622;
  background-image:
    linear-gradient(#b4beb60b 1px, transparent 1px),
    linear-gradient(90deg, #b4beb60b 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px solid #283b31;
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  color: #e5e7d9;
}
.board canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.board-caption {
  position: absolute;
  left: 20px;
  top: 17px;
  color: #d0d9c9;
}
.board-bottom {
  position: absolute;
  bottom: 15px;
  left: 20px;
  color: #a7b8ac;
  font: 11px var(--mono);
}
.board-tag {
  position: absolute;
  bottom: 14px;
  right: 16px;
  color: #c2cdbb;
  font: 10px var(--mono);
}
.hero,
.project-view {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr);
  gap: 20px;
}
.portal {
  display: grid;
  grid-template-columns: minmax(270px, 0.85fr) minmax(0, 1.25fr);
  gap: clamp(24px, 5vw, 85px);
  align-items: center;
  min-height: 63vh;
}
.portal .board {
  min-height: 440px;
}
.portal p {
  margin: 16px 0;
}
.panel,
.card,
.sheet {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.panel {
  padding: 22px;
}
.panel > p,
.panel > form,
.panel > .actions {
  margin-top: 14px;
}
.card {
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.stack,
.record-list,
form {
  display: grid;
  gap: 12px;
}
.sheet {
  overflow-x: auto;
}
.sheet table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 0.88rem;
}
th {
  color: var(--mute);
  background: #edefe5;
}
th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: none;
}
.textbtn {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  color: var(--orange);
}
.textbtn:hover {
  background: transparent;
  text-decoration: underline;
}
.statrow {
  display: flex;
  gap: 35px;
  margin: 20px 0;
}
.statrow b {
  display: block;
  font-weight: 500;
  font-size: 2.4rem;
  letter-spacing: -0.065em;
}
.kicker {
  color: var(--mute);
}
.badge {
  display: inline-block;
  font: 11px var(--mono);
  color: #3c5141;
  background: #e4e9dd;
  border: 1px solid #c9d2c3;
  border-radius: 2px;
  padding: 3px 6px;
}
.warn {
  color: #8a371a;
  background: #f7e4d6;
}
.empty {
  padding: 24px;
  border: 1px dashed #b9c1b4;
  border-radius: 4px;
  line-height: 1.55;
  color: var(--mute);
}
label {
  display: grid;
  gap: 5px;
  font-weight: 600;
  font-size: 0.82rem;
}
input,
textarea,
select {
  border: 1px solid #aab4a7;
  border-radius: 3px;
  padding: 10px;
  background: white;
  color: var(--ink);
  max-width: 100%;
  min-width: 0;
}
input[type="checkbox"] {
  width: 1.1em;
  height: 1.1em;
}
.check {
  display: flex;
  align-items: center;
  font-weight: 450;
  gap: 10px;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.wide {
  grid-column: 1/-1;
}
.smalltxt {
  font-size: 0.85rem;
  color: var(--mute);
  line-height: 1.5;
}
.back {
  margin-bottom: 12px;
}
.msg {
  color: #8d2d11;
  font-size: 0.9rem;
}
.file {
  max-width: 100%;
  font-size: 0.85rem;
}
.editor {
  width: 100%;
  height: 75vh;
  min-height: 450px;
  border: 1px solid var(--line);
  background: white;
}
.drawing {
  background: #e4e6dd;
  border: 1px solid var(--line);
  padding: 14px;
  overflow: auto;
  text-align: center;
}
.drawing canvas {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
  margin: auto;
  cursor: crosshair;
  box-shadow: 0 2px 12px #29372f26;
  touch-action: manipulation;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0;
}
.toolbar label {
  display: flex;
  align-items: center;
}
.toolbar input {
  width: 90px;
}
.train-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.train-kpis b {
  display: block;
  font-size: 2.4rem;
  font-weight: 500;
}
.icon {
  font-size: 1.2rem;
  padding: 3px 10px;
}
dialog {
  width: min(520px, calc(100% - 30px));
  border: 1px solid #949e90;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 24px;
  max-height: 90dvh;
}
dialog::backdrop {
  background: #10201988;
}
.dialog-title {
  margin-bottom: 16px;
}
#notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 92%;
  padding: 12px 18px;
  background: #1e2b24;
  color: white;
  z-index: 5;
  border-radius: 4px;
  box-shadow: 0 3px 22px #0003;
}
.errorbar {
  padding: 10px 14px;
  background: #fff0e6;
  color: #7e300b;
  border: 1px solid #e6c5ad;
  margin: 8px 0;
}
.authform {
  max-width: 430px;
}
.authform .primary {
  justify-self: start;
}
.narrow {
  max-width: 800px;
}
.details {
  margin: 8px 0;
  color: var(--mute);
  font-size: 0.88rem;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.drawing-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 16px;
}
.drawing-work .panel {
  align-self: start;
}
.record-list .card {
  flex-wrap: wrap;
}
.card div {
  overflow-wrap: anywhere;
}
.breadcrumbs {
  font: 11px var(--mono);
  color: #667165;
}
blockquote {
  margin: 0;
}
@media (max-width: 800px) {
  header {
    flex-wrap: wrap;
  }
  .hero,
  .portal,
  .project-view,
  .drawing-work {
    grid-template-columns: 1fr;
  }
  .portal .board {
    min-height: 270px;
  }
  .portal {
    align-items: start;
  }
  .title-row {
    align-items: flex-start;
  }
  .board {
    min-height: 270px;
  }
  .tabs {
    gap: 0;
  }
  .tabs button {
    padding: 11px 8px;
  }
  .train-kpis {
    gap: 5px;
  }
  .train-kpis .panel {
    padding: 10px;
  }
  .identity span {
    font-size: 0.8rem;
  }
  footer {
    font-size: 8px;
  }
  .card {
    padding: 12px;
  }
  .editor {
    height: 78vh;
  }
}
@media (max-width: 500px) {
  nav {
    gap: 3px;
  }
  .identity b {
    font-size: 1.5rem;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .title-row,
  .section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  nav button {
    padding: 6px 8px;
  }
  .statrow {
    gap: 18px;
  }
}
[hidden] {
  display: none !important;
}
