/* About page: same tokens as the ledger, one reading column */

.about-body {
  min-height: 100vh;
  overflow-y: auto;
  background: var(--ink-0);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.about-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 24px calc(80px + env(safe-area-inset-bottom, 0px));
}

/* The topic list stays in place while the text scrolls */
.about-side {
  min-width: 0;
  position: sticky;
  top: 40px;
  align-self: start;
}

.about-back {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--fg-3);
  font: 400 12px var(--font-mono);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.about-back::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 10px 1px 3px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: rotate(45deg);
}
.about-back:hover { color: var(--fg); }

.about-side-title {
  margin-bottom: 10px;
  font: 400 11px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.about-nav { display: flex; flex-direction: column; gap: 2px; }

.about-nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--fg-2);
  font-size: 14px;
  text-decoration: none;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.about-nav a:hover { background: oklch(1 0 0 / 0.05); color: var(--fg); }
.about-nav a.active { background: oklch(1 0 0 / 0.09); color: var(--fg); }
.about-nav a:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }

.about { min-width: 0; }

.about h1 {
  font: 500 40px/1.1 var(--font-sans);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.about-lead {
  margin-top: 16px;
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-2);
  text-wrap: pretty;
}

.about section { min-width: 0; }
.about section[hidden] { display: none; }

/* Without JavaScript every topic is shown one after another */
.no-js .about section + section { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }

.about section.enter { animation: topic-in 320ms var(--ease-out) both; }

@keyframes topic-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .about section.enter { animation: none; }
}

.about h2 { font: 500 22px/1.2 var(--font-sans); letter-spacing: -0.02em; }

.about h3 {
  margin-top: 28px;
  font: 400 11px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.about p,
.about-list li { max-width: 66ch; font-size: 15px; line-height: 1.6; color: var(--fg-2); text-wrap: pretty; }
.about p { margin-top: 12px; }
.about h3 + p { margin-top: 8px; }

.about-list { margin: 12px 0 0 18px; display: flex; flex-direction: column; gap: 8px; }

.about-table { margin-top: 16px; border: 1px solid var(--line); }

.about-row {
  display: grid;
  grid-template-columns: 230px 110px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.about-row:last-child { border-bottom: 0; }
.about-row > span { padding: 10px 12px; font-size: 13.5px; line-height: 1.5; color: var(--fg-2); border-right: 1px solid var(--line); }
.about-row > span:last-child { border-right: 0; }
.about-row > span:first-child { color: var(--fg); }

.about-row-head > span {
  font: 400 11px var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.lvl.bad { color: var(--bad); }
.lvl.warn { color: var(--warn); }

.about-bar { display: block; }
.about-menu-btn { display: none; }

@media (max-width: 760px) {
  .about-shell { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 0 16px calc(64px + env(safe-area-inset-bottom, 0px)); }
  .about-side { position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: calc(2px + env(safe-area-inset-top, 0px)) 16px 8px; background: oklch(0.115 0.004 260 / 0.97); border-bottom: 1px solid var(--line); }
  .about-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 0; color: var(--fg); font-size: 14px; }
  .about-back::before { width: 11px; height: 11px; border-width: 0 0 2.5px 2.5px; margin: 0 12px 1px 4px; }
  .about-side-title { display: none; }
  /* the topics are a menu under a burger button, so the header stays one slim row */
  .about-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .about-menu-btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 4px 0 12px; border: 0; background: none; color: var(--fg); font-size: 14px; }
  .about-side .about-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; flex-direction: column; gap: 2px; max-height: min(60vh, 440px); overflow-y: auto; padding: 12px 8px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--ink-2); border-top: 1px solid var(--line-2); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px oklch(0 0 0 / 0.5); touch-action: pan-y; }
  .about-side .about-nav::before { content: ""; display: block; position: sticky; top: 0; flex: none; width: 40px; height: 4px; margin: 0 auto 8px; border-radius: 2px; background: var(--line-3); }
  .about-side.menu-open .about-nav { display: flex; animation: about-sheet-up 240ms var(--ease-out); }
  .about-nav a { padding: 12px 14px; font-size: 15px; }
  .about h1 { font-size: 30px; }
  .about-row { grid-template-columns: 1fr; }
  .about-row > span { border-right: 0; padding: 4px 12px; }
  .about-row > span:first-child { padding-top: 10px; }
  .about-row > span:last-child { padding-bottom: 10px; }
  .about-row-head { display: none; }
}


/* The button under each topic that leads to the next one */
.about-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--fg);
  font-size: 15px;
  text-decoration: none;
  transition: border-color 160ms var(--ease-out);
}

.about-next:hover { border-color: var(--fg); }
.about-next::after { content: ""; flex: none; width: 11px; height: 11px; margin-right: 6px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(-45deg); }
.about-next-label { color: var(--fg-3); font: 400 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 2px; }


@keyframes about-sheet-up { from { transform: translateY(100%); } to { transform: none; } }

/* The next-topic button is for the phone: on a desktop the side list is always in view */
@media (min-width: 761px) {
  .about-next { display: none; }
}
