/* virtusmaxxing.com: a reference page with its own identity (docs/definition.md, "Look").
   Simple like a reference work, never a copy of one: a single centred reading column,
   warm paper tones, serif headings over a sans-serif body, plain underlined blue links,
   no images, gradients or animation.
   Every colour is a token on :root, redefined for dark mode (the system setting, or
   data-theme on <html>), so the whole page follows the theme from one set of names. */

:root {
  --bg: #fbfaf8;
  --surface: #f3f1ed;
  --text: #1d1c1a;
  --muted: #67645e;
  --line: #dfdbd4;
  --link: #1d4fa8;
  --link-hover: #133a80;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131312;
    --surface: #1c1b19;
    --text: #ecebe7;
    --muted: #a19e97;
    --line: #2f2e2b;
    --link: #8fb3ff;
    --link-hover: #b9d0ff;
  }
}
:root[data-theme="dark"] {
  --bg: #131312;
  --surface: #1c1b19;
  --text: #ecebe7;
  --muted: #a19e97;
  --line: #2f2e2b;
  --link: #8fb3ff;
  --link-hover: #b9d0ff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
}
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent);
}
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

/* ---- The bar: the name and two jumps, on the column's width ---- */
.bar { border-bottom: 1px solid var(--line); }
.bar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.mark { font-family: var(--serif); font-size: 19px; color: var(--text); text-decoration: none; }
.mark:hover { color: var(--text); }
.bar-links { display: flex; gap: 18px; font-size: 14px; }
.bar-links a { color: var(--muted); text-decoration: none; }
.bar-links a:hover { color: var(--text); }

/* ---- The column ---- */
.page { max-width: 720px; margin: 0 auto; padding: 48px 20px 64px; counter-reset: section; }
p { margin: 0 0 14px; }

/* The head, set like a dictionary entry: the word, its definition, a thin rule. */
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}
.definition {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  color: var(--muted);
  margin: 10px 0 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

/* The facts at a glance: label over value, two across, one across on a phone. */
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin: 24px 0 32px;
  padding: 0;
}
.facts div { margin: 0; }
.facts dt {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { margin: 2px 0 0; font-size: 16px; line-height: 1.5; }

.lead { font-size: 19px; line-height: 1.65; }

/* ---- Contents: the section numbers in the same form the headings show ---- */
.contents { margin: 36px 0 8px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
/* A grid filled column by column (four rows, two columns), not CSS columns: the
   column break let the first item of the second column lose its top margin and
   sit a few pixels higher than the first column's. */
.contents ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 6px 24px;
  counter-reset: toc;
}
.contents li { counter-increment: toc; margin: 0; }
.contents li::before {
  content: counter(toc, decimal-leading-zero);
  display: inline-block;
  width: 2.2em;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.contents a { text-decoration: none; color: var(--text); }
.contents a:hover { color: var(--link); text-decoration: underline; }

/* ---- Sections: numbered 01, 02... in a small line above each heading ---- */
section { margin-top: 48px; }
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 14px;
  counter-increment: section;
}
h2::before {
  content: counter(section, decimal-leading-zero);
  display: block;
  font-family: var(--sans);
  font-weight: normal;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  margin: 24px 0 6px;
}

blockquote {
  margin: 8px 0 18px;
  padding: 2px 0 2px 20px;
  border-left: 2px solid var(--text);
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
}

/* ---- Notes: a small raised number, no brackets ---- */
sup.fn { font-size: 11px; line-height: 0; margin-left: 1px; }
/* Padding with a matching negative margin widens the tap area of the small number without
   moving the text around it (search engines flag tap targets that are too small on phones). */
sup.fn a { text-decoration: none; font-weight: 600; padding: 6px 4px; margin: -6px -4px; }

/* ---- The variants: horizontal lines only ---- */
table.terms { width: 100%; border-collapse: collapse; margin: 8px 0 8px; font-size: 16px; }
table.terms th {
  text-align: left;
  font-weight: normal;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 12px 8px 0;
  border-bottom: 1px solid var(--text);
}
table.terms td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.terms td:first-child { white-space: nowrap; }
table.terms tr.self td { font-weight: 600; border-bottom: 0; }

/* ---- The four virtues: one quiet card each ---- */
.virtues {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.virtues li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: 10px;
}
.virtues b { font-family: var(--serif); font-size: 21px; }
.virtues .habit { color: var(--muted); font-size: 15px; }

/* ---- Term pages: the breadcrumb above the title ---- */
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span { margin: 0 6px; }

/* ---- The hub: one card per term with a page, two across, one on a phone ---- */
.cards {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cards a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}
.cards a:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, var(--line)); }
.cards b { font-family: var(--serif); font-size: 21px; }
.cards span { color: var(--muted); font-size: 15px; }

/* ---- Lists ---- */
.steps { padding-left: 24px; margin: 0 0 16px; }
.steps li { margin: 6px 0; padding-left: 4px; }
.steps li::marker { font-family: var(--serif); font-weight: 600; }
.nots, .further { padding-left: 20px; margin: 0; }
.nots li, .further li { margin: 8px 0; }

/* ---- Sources ---- */
.sources { padding-left: 24px; margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.sources li { margin: 10px 0; padding-left: 4px; }
.sources li::marker { color: var(--text); font-weight: 600; }
/* The arrows lead back to each place the source is cited. */
.sources .back { text-decoration: none; margin-left: 4px; }
/* The source a reader jumped to is marked, so it is found at once. */
.sources li:target { color: var(--text); }

.foot {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ---- Phone width: one column for the facts, the contents and the virtues ---- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .page { padding: 32px 16px 48px; }
  .bar-inner { padding: 12px 16px; }
  h1 { font-size: 40px; }
  .definition { font-size: 21px; }
  .lead { font-size: 17px; }
  h2 { font-size: 26px; }
  .facts, .virtues, .cards { grid-template-columns: 1fr; }
  .contents ol { grid-template-rows: none; grid-auto-flow: row; }
  table.terms td:first-child { white-space: normal; }
}
