@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans+Condensed:wght@500;600;700&display=swap");

@font-face {
  font-family: "Departure Mono";
  src: url("https://laurelin-inc.com/fonts/DepartureMono-Regular.woff2")
    format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --bg: #1f1f1f;
  --bg-deep: #000;
  --gray-1: #2e2e2e;
  --gray-2: #424242;
  --gray-3: #7a7a7a;
  --gray-4: #a0a0a0;
  --text: #e6e6e6;
  --white: #fafafa;
  --intl-orange: #ff4f00;
  --card-paper: #f4f1ea;
  --card-paper-2: #ebe7dd;
  --card-ink: #1a1c20;
  --card-ink-2: #0d0e10;
  --card-muted: #6b6e76;
  --card-rule: #d8d3c7;
  --card-rule-2: #c4bfa9;
  --font-display:
    "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", Helvetica,
    Arial, sans-serif;
  --font-body:
    "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --font-mono:
    "Departure Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  --amber: #b77b16;
  --red: #a63c2c;
  --green: #326b3a;
  --blue: #285f8f;
  --violet: #684f9c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--card-paper);
  color: var(--card-ink);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.42;
  text-rendering: optimizeLegibility;
}

button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
}

#page {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(320px, 1fr) minmax(
      260px,
      0.85fr
    );
  gap: 18px 28px;
  align-items: start;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 24px 40px;
  border: 0;
  background: var(--card-paper);
}

#consoleDiv {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 36px;
  margin: 0 -24px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--gray-2);
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
}

.consoleLabel,
#year {
  white-space: nowrap;
  text-transform: uppercase;
}

.consoleLabel {
  color: var(--gray-4);
}

#year {
  color: var(--intl-orange);
  font-variant-numeric: tabular-nums;
}

#topDiv {
  grid-column: 1 / -1;
  position: relative;
  width: auto;
  min-width: 0;
  margin-bottom: 0;
  padding: 2px 0 16px;
  border-bottom: 1px solid var(--card-rule-2);
}

#saveDiv {
  position: absolute;
  top: 6px;
  right: 0;
  display: flex;
  gap: 6px;
}

.tiny {
  max-width: calc(100% - 140px);
  margin: 0 0 3px;
  color: var(--card-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--card-ink-2);
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.96;
  text-transform: uppercase;
}

h2 {
  margin: 8px 0 0;
  color: var(--card-ink);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

h2 span {
  color: var(--intl-orange);
}

b {
  display: block;
  color: var(--card-ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

hr {
  border: 0;
  border-top: 1px solid var(--card-rule-2);
  margin: 5px 0 9px;
}

meter {
  width: min(100%, 220px);
  height: 11px;
  margin: 3px 0 7px;
  accent-color: var(--intl-orange);
}

.button2 {
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--card-rule-2);
  border-radius: 2px;
  background: var(--card-paper-2);
  color: var(--card-ink);
  cursor: pointer;
}

.button2:hover:not(:disabled) {
  border-color: var(--card-ink-2);
  background: var(--white);
}

.button2:disabled {
  border-color: var(--card-rule);
  background: #eee9df;
  color: #938d82;
  cursor: default;
}

.buttonBig {
  width: 172px;
  height: 32px;
  border-color: var(--intl-orange);
  background: var(--intl-orange);
  color: var(--white);
  font-size: 12px;
}

.buttonBig:hover:not(:disabled) {
  border-color: var(--card-ink-2);
  background: var(--card-ink-2);
  color: var(--white);
}

.stepper {
  display: inline-flex;
  gap: 3px;
  margin-left: 5px;
  vertical-align: baseline;
}

.stepButton {
  width: 24px;
  min-height: 20px;
  padding: 0;
  text-align: center;
}

#leftColumn,
#middleColumn,
#rightColumn {
  position: static;
  min-width: 0;
  width: auto;
}

.module {
  margin-bottom: 18px;
  min-width: 0;
}

#banner {
  display: none;
  grid-column: 1 / -1;
  width: auto;
  min-width: 0;
  margin: 0 0 2px;
  padding: 8px 10px;
  border: 1px solid var(--card-rule-2);
  background: var(--card-paper-2);
  font-family: var(--font-mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

#banner.show {
  display: block;
}

#banner.good {
  border-color: #6d8f55;
  background: #edf3df;
}

#banner.bad {
  border-color: #a65c45;
  background: #f4dfd6;
}

#actions,
#projects,
#inventory {
  font-size: 12px;
}

.buyRow {
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.buyRow .button2 {
  min-width: 150px;
  max-width: 100%;
  text-align: left;
}

.count {
  color: var(--card-muted);
  margin-left: 4px;
}

.costLine,
.descLine {
  margin-top: 2px;
  color: var(--card-muted);
}

.descLine {
  max-width: 240px;
}

.projectButton {
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0 0 7px;
  padding: 7px 8px;
  border: 1px solid var(--card-rule-2);
  border-radius: 2px;
  background: var(--card-paper-2);
  color: var(--card-ink);
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.projectButton:hover:not(:disabled) {
  border-color: var(--card-ink-2);
  background: var(--white);
}

.projectButton:disabled {
  border-color: var(--card-rule);
  background: #eee9df;
  color: #938d82;
  cursor: default;
}

.projectTitle {
  display: block;
  font-weight: 700;
}

.projectCost {
  color: var(--card-muted);
  font-weight: 400;
}

.projectDesc {
  display: block;
  margin-top: 3px;
  color: var(--card-muted);
  font-size: 11px;
}

.empty {
  color: var(--card-muted);
  margin: 0;
}

.assetLine {
  display: flex;
  justify-content: space-between;
  width: min(240px, 100%);
  gap: 12px;
  border-bottom: 1px dotted var(--card-rule);
  padding: 2px 0;
}

.assetLine span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.assetLine b {
  flex: 0 0 auto;
  font-family: var(--font-mono);
}

#log {
  display: flex;
  min-width: 0;
  height: auto;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

#log p {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 32ch;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
}

#log p:first-child {
  max-width: 54ch;
  color: var(--white);
}

#log p + p {
  margin-left: 13px;
  padding-left: 13px;
  border-left: 1px solid var(--gray-2);
  color: var(--gray-4);
}

#log p:nth-child(n + 4) {
  display: none;
}

#log .good {
  color: #9cc48b;
}

#log .bad {
  color: #e08f78;
}

#log .research {
  color: #8eb5d8;
}

#log .weird {
  color: #ffb36b;
}

.right {
  float: right;
  color: var(--card-muted);
}

#postcard {
  display: block;
  width: min(260px, 100%);
  height: auto;
  border: 1px solid var(--card-rule-2);
  filter: grayscale(18%) contrast(1.03);
}

@media (max-width: 1040px) {
  #page {
    grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.25fr);
  }

  #rightColumn {
    grid-column: 1 / -1;
  }

  #postcard {
    width: min(360px, 100%);
  }
}

@media (max-width: 720px) {
  body {
    background: var(--card-paper);
  }

  #page {
    display: block;
    width: auto;
    margin: 0;
    padding: 0 12px 28px;
    border: 0;
  }

  #consoleDiv {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    margin: 0 -12px 14px;
    padding: 8px 10px;
  }

  .consoleLabel {
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #log p:first-child {
    max-width: 100%;
  }

  #log p:nth-child(n + 2) {
    display: none;
  }

  #topDiv {
    padding-top: 0;
  }

  #saveDiv {
    position: static;
    margin: 10px 0 0;
  }

  .tiny {
    max-width: 100%;
  }

  h1 {
    font-size: 36px;
  }

  #leftColumn,
  #middleColumn,
  #rightColumn {
    width: auto;
  }

  .projectButton {
    width: 100%;
  }

  #postcard {
    width: 100%;
    max-width: 360px;
  }
}
