/* Tope — editorial minimal, light */

:root {
  --bg: #fcfcfa;
  --ink: #171717;
  --muted: #9a9691;
  --faint: #c9c5bf;
  --hair: rgba(0, 0, 0, 0.1);
  --copper: #a06a38;
  --steel: #64747f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: light; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 24px 120px;
}

a { color: inherit; text-decoration: none; }

/* masthead */

.mark {
  font-size: 52px;
  font-weight: 600;
  letter-spacing: 0.3em;
  line-height: 1;
}

.tagline {
  margin-top: 28px;
  color: var(--muted);
  max-width: 46ch;
}

/* numbered index */

.index { margin-top: 88px; }

.index a.row,
.index .row {
  display: grid;
  grid-template-columns: 3.5ch 1fr auto auto;
  gap: 20px;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid var(--hair);
}

.index .row:last-child { border-bottom: 1px solid var(--hair); }

.index a.row:hover .name { text-decoration: underline; text-underline-offset: 4px; }

.row .num { color: var(--faint); }
.row .name { font-weight: 500; }
.row .status { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; }
.row .status.active { color: var(--copper); }
.row .amount { color: var(--steel); font-variant-numeric: tabular-nums; min-width: 9ch; text-align: right; }

.row.quiet .name { color: var(--muted); font-weight: 400; }

/* totals */

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 56px;
  padding-top: 20px;
}

.total .label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; }
.total .amount { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* footer */

footer {
  margin-top: 120px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

footer a { text-decoration: underline; text-underline-offset: 3px; }

/* subsystem pages */

.back {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 56px;
}

.back:hover { color: var(--ink); }

h1 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: flex;
  gap: 24px;
}

.meta .active { color: var(--copper); }

section { margin-top: 72px; }

h2 {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hair);
}

h2 .sec-num { color: var(--faint); margin-right: 12px; font-weight: 400; }

section p { margin-top: 16px; max-width: 60ch; }

.pending { color: var(--faint); margin-top: 16px; }

section ul { margin-top: 16px; padding-left: 1.4em; max-width: 60ch; }
section li { margin-top: 8px; }
section li::marker { color: var(--faint); }

.kv {
  display: grid;
  grid-template-columns: minmax(18ch, 24ch) 1fr;
  gap: 0 24px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hair);
  align-items: baseline;
}
.kv:first-of-type { margin-top: 20px; }
.kv .k { color: var(--muted); font-size: 13px; }
.kv .v { font-variant-numeric: tabular-nums; }

.subhead {
  margin-top: 32px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--steel);
}

.log-entry {
  display: grid;
  grid-template-columns: 9ch 1fr;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
}
.log-entry .date { color: var(--muted); font-size: 13px; }
.log-entry p { margin: 0; }

.note { color: var(--muted); font-size: 13px; margin-top: 12px; max-width: 60ch; }

/* secondary nav (non-ledger doc sections) */

.more { margin-top: 80px; }
.more-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.more a.mrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--hair);
}
.more a.mrow:last-child { border-bottom: 1px solid var(--hair); }
.more .cell { display: flex; flex-direction: column; gap: 4px; }
.more .m-name { font-weight: 500; }
.more .m-desc { color: var(--muted); font-size: 13px; }
.more .arrow { color: var(--faint); }
.more a.mrow:hover .m-name { text-decoration: underline; text-underline-offset: 4px; }

/* contacts / reference tables */

.people { margin-top: 20px; }
.person {
  display: grid;
  grid-template-columns: minmax(16ch, 22ch) 1fr;
  gap: 0 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hair);
  align-items: baseline;
}
.person .who { font-weight: 500; }
.person .contact { color: var(--steel); font-size: 13px; margin-top: 4px; }
.person .role { color: var(--muted); font-size: 13px; }

.empty { margin-top: 88px; color: var(--muted); max-width: 46ch; }
