/* Tokens, type, the frame of the window. */

:root {
  --canvas: #e8ede7;
  --surface: #ffffff;
  --sunk: #f3f6f2;
  --ink: #16231b;
  --ink-2: #4b5b51;
  --ink-3: #7b8a80;
  --line: #d3dcd2;
  --line-soft: #e4eae3;

  --brand: #216637;
  --brand-hover: #1b572e;
  --brand-deep: #163d22;
  --brand-tint: #ddece0;
  --brand-glow: #8fc79b;

  --late: #b0412a;
  /* The free year's line: bordeaux, so it never reads as the late red, which means something. */
  --trial: #7b1f34;
  --late-tint: #f7e3dc;
  --soon: #9a6a14;
  --soon-tint: #f5ead2;

  --display: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(22, 35, 27, 0.06), 0 1px 1px rgba(22, 35, 27, 0.04);
  --shadow-lift: 0 12px 32px rgba(22, 35, 27, 0.18);
  --rail: 236px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
}

input,
textarea,
select,
button {
  font: inherit;
  color: inherit;
}

input,
textarea {
  user-select: text;
}

.sprite {
  display: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* --- frame ----------------------------------------------------------------- */

.app {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  height: 100vh;
}

.rail {
  background: var(--brand-deep);
  color: #e6f0e8;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  gap: 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 18px;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-name {
  font: 600 18px/1.1 var(--display);
  font-stretch: 90%;
  letter-spacing: 0.01em;
  color: #fff;
}

.brand-sub {
  font: 400 12px/1.3 var(--body);
  color: #a9c4af;
  margin-top: 3px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #cfe0d3;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand-glow);
}

/* A module is a group in the menu that opens to its pages. One is open at a time,
   so the rail never becomes a long list of everything the farm has ever taken. */
.nav-group {
  margin-top: 2px;
}

.nav-head {
  color: #e8f1ea;
}

.nav-group.is-open .nav-head {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
}

.nav-caret {
  margin-left: auto;
  width: 16px;
  height: 16px;
  opacity: 0.55;
}

.nav-pages {
  margin: 2px 0 6px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-sub {
  padding-left: 10px;
  font-size: 13.5px;
}

.nav-sub.is-active::before {
  left: -15px;
}

/* A module the server offers and this farm has not taken: present, and plainly not here. */
.nav-offer {
  color: rgba(207, 224, 211, 0.55);
}

.nav-offer:hover {
  color: rgba(255, 255, 255, 0.85);
}

.nav-count {
  margin-left: auto;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--late);
  color: #fff;
  font: 600 11px/18px var(--display);
  text-align: center;
}

.rail-foot {
  margin-top: auto;
  padding: 12px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #93b09a;
  line-height: 1.45;
}

.rail-foot strong {
  color: #cfe0d3;
  font-weight: 600;
}

.main {
  overflow-y: auto;
  padding: 30px 40px 60px;
  outline: none;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  animation: page-in 140ms ease-out;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow {
  font: 600 11px/1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.page-title {
  font: 600 28px/1.1 var(--display);
  font-stretch: 90%;
  letter-spacing: -0.005em;
  margin: 0;
}

.page-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

h2.section-title {
  font: 600 15px/1.2 var(--display);
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.muted {
  color: var(--ink-2);
}

.num {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
