/* selfledger.app — the app's own materials, on a page.
   One visual world on purpose: ink and paper, no light mode. The app has
   never had one either. */

:root {
  --ink: #15171B;
  --deep: #101215;
  --surface: #1B1E24;
  --line: #2A2D34;
  --paper: #E9E4D8;
  --faded: #8B8778;
  --dim: #5C594F;
  --brass: #B99A5F;
  --brass-dim: #7D6A45;

  --display: "Libre Caslon Display", Georgia, serif;
  --body: "Libre Caslon Text", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --measure: 34rem;
  --gutter: clamp(1.5rem, 5vw, 3rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  /* The paper grain, at the opacity the app uses: if it can be noticed,
     the opacity is wrong. */
  background-image: radial-gradient(rgba(233, 228, 216, 0.022) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- the eyebrow: the app's label voice --------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faded);
  margin: 0 0 0.75rem;
}

.eyebrow--brass { color: var(--brass); }

/* ---- masthead ----------------------------------------------------------- */

header.masthead {
  padding: clamp(3rem, 12vh, 6rem) 0 0;
  text-align: center;
}

.mark {
  width: 132px;
  margin: 0 auto 1.75rem;
}

.mark svg { display: block; width: 100%; height: auto; }

.wordmark {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--faded);
  margin: 0;
  text-indent: 0.42em;
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 2.9rem);
  line-height: 1.15;
  text-wrap: balance;
  margin: 1.5rem 0 0;
}

.standfirst {
  color: var(--faded);
  font-size: 1.125rem;
  margin: 1.25rem auto 0;
  text-wrap: pretty;
}

/* ---- rules and sections ------------------------------------------------- */

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: clamp(3rem, 9vh, 4.5rem) 0;
}

section { margin: 0 0 clamp(2.5rem, 8vh, 4rem); }

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h3 {
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.0625rem;
  color: var(--paper);
  margin: 2rem 0 0.4rem;
}

p { margin: 0 0 1.1rem; }

a {
  color: var(--brass);
  text-decoration-color: var(--brass-dim);
  text-underline-offset: 0.2em;
}

a:hover { color: var(--paper); }

a:focus-visible {
  outline: 1px solid var(--brass);
  outline-offset: 3px;
}

strong { font-weight: 400; color: var(--paper); }

/* ---- the ledger list: each line an entry -------------------------------- */

.ledger {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.ledger li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.ledger .count {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}

.ledger .what { color: var(--faded); }
.ledger .what b { font-weight: 400; color: var(--paper); }

/* ---- the refusals: what the app will not do ----------------------------- */

.refusals {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--faded);
}

.refusals li {
  padding: 0.3rem 0 0.3rem 1.5rem;
  position: relative;
}

.refusals li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--dim);
}

/* ---- price plate -------------------------------------------------------- */

.plate {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem;
}

.plate .price {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--brass);
  margin: 0;
  line-height: 1;
}

.plate .price span {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faded);
  display: block;
  margin-top: 0.6rem;
  line-height: 1.6;
}

.plate p:last-child { margin-bottom: 0; }

/* ---- legal prose -------------------------------------------------------- */

.doc { padding-top: clamp(2.5rem, 8vh, 4rem); }

.doc h1 { font-size: clamp(1.75rem, 5vw, 2.25rem); margin-top: 0.75rem; }

.doc h2 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 2.75rem 0 0.9rem;
}

.doc ul { padding-left: 1.15rem; color: var(--faded); }
.doc li { margin-bottom: 0.5rem; }

.lede {
  color: var(--paper);
  border-left: 1px solid var(--brass-dim);
  padding-left: 1.25rem;
  margin: 1.75rem 0 2rem;
}

/* ---- footer ------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 10vh, 5rem);
  padding: 2rem 0 3.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

footer a { color: var(--faded); text-decoration: none; }
footer a:hover { color: var(--brass); }

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