/* The document pages: market, my land, activity.
   Base tokens come from style.css, the bar from app.css. */

.bar-nav {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
}

/* The page you are on stays in the bar but stops being a link — a nav that
   still offers the current page reads as a place you have not arrived at. */
.bar .here {
  font-size: 0.9rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

.page {
  max-width: 76rem;
  margin: 0 auto;
  padding: 3.4rem clamp(1.2rem, 4vw, 3rem) 4rem;
}

.page-head { max-width: 44rem; }

.page-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 0.9rem;
}

.page-head p {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.page h2 {
  font-size: 1.35rem;
  margin: 3rem 0 1.2rem;
}

/* ---- figure strip ---- */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1.4rem 2rem;
  margin-top: 2.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--rule);
}

.figures div { border-left: 1px solid var(--rule); padding-left: 0.9rem; }

.figures dt {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.figures dd {
  font-family: 'Instrument Serif', serif;
  font-size: 1.7rem;
  line-height: 1.15;
  margin-top: 0.15rem;
}

.figures dd small {
  font-family: 'Archivo', sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 0.15rem;
}

/* ---- controls ---- */

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.4rem;
  margin: 1.6rem 0 1rem;
}

.controls .group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.controls .label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tab {
  padding: 0.24rem 0.6rem;
  border: 1px solid var(--rule);
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.tab:hover { color: var(--ink); border-color: var(--face); }
.tab.on { color: var(--bg); background: var(--ink); border-color: var(--ink); }

/* ---- tables ---- */

/* Wide tables scroll inside their own box rather than pushing the page sideways.
   The header row sticks so a long list keeps its column names. */
.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--rule);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  position: sticky;
  top: 0;
  background: var(--bg);
  text-align: left;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.7rem 0.9rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}

tbody tr:hover { background: #131313; }

.num { text-align: right; font-variant-numeric: tabular-nums; }
.plot-cell { min-width: 9rem; }

.plot-cell b { font-weight: 500; }
.plot-cell span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

td code, .wallet-cell code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted);
}
td a { color: var(--ink); }

/* Mine, wherever it appears: the one row in a long table you are looking for. */
tr.mine td { background: #161616; }
tr.mine:hover td { background: #1b1b1b; }

.tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--face);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

button.mini {
  padding: 0.3rem 0.8rem;
  font: 500 0.82rem 'Archivo', sans-serif;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
button.mini:disabled { opacity: 0.35; cursor: default; }
button.mini:hover:not(:disabled) { background: #ffffff; }

button.mini.ghost {
  background: none;
  color: var(--muted);
  border: 1px solid var(--rule);
}
button.mini.ghost:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--face);
  background: none;
}

.ask-form { display: flex; gap: 0.35rem; align-items: center; }

.ask-form input {
  width: 6.5rem;
  padding: 0.28rem 0.5rem;
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
}
.ask-form input:focus { outline: none; border-color: var(--face); }
.ask-form input::placeholder { color: var(--muted); }

/* ---- notes and states ---- */

.note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.empty {
  color: var(--muted);
  padding: 2.4rem 0;
  border-top: 1px solid var(--rule);
}

.txstate { font-size: 0.82rem; min-height: 1.2em; margin-top: 0.8rem; }
.txstate a { color: var(--ink); }
.txstate.err { color: #d98a8a; }

/* `style.css` centres every bare `footer` in a 60rem column with a 5.5rem
   gutter — that rule belongs to the explainer's document layout, and inside a
   full-width page it reads as the footer belonging to something else. */
.page-foot {
  max-width: none;
  margin: 3.4rem 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8rem;
}
.page-foot p + p { margin-top: 0.4rem; }

@media (max-width: 760px) {
  .bar-nav { gap: 0.9rem; }
  .page { padding-top: 2.4rem; }
  th, td { padding-left: 0.6rem; padding-right: 0.6rem; }
}
