/* Reading pages of the site («Про проєкт», «План і виконання»): one column like a sheet of a drawing set.
   Colours and fonts come from site.css (one look for the whole site). */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 64px;
}
a { color: var(--accent); }
.doc { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 44px; }
.doc > header { display: flex; flex-direction: column; gap: 12px; padding-bottom: 28px; border-bottom: 2px solid var(--rule); }
.eyebrow { font: 600 12px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
h1 { font-size: clamp(28px, 5vw, 38px); line-height: 1.15; margin: 0; font-weight: 700; text-wrap: balance; }
h2 { font-size: 22px; margin: 0; font-weight: 700; text-wrap: balance; }
h3 { font-size: 17px; margin: 0; font-weight: 650; }
.lead { margin: 0; color: var(--muted); max-width: 62ch; }
section { display: flex; flex-direction: column; gap: 16px; }
section > p { margin: 0; }
.note { margin: -6px 0 0; color: var(--muted); font-size: 15px; }
nav.toc { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 15px; }

/* Cards of equal weight: what you get, how it works. */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cards li { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.cards li p { margin: 0; color: var(--muted); font-size: 15px; }

/* Steps numbered like part callouts: the number in a circle. */
ol.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
ol.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.num {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font: 700 15px/1 var(--font-mono); font-variant-numeric: tabular-nums;
}
ol.steps p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

ul.plain { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
ul.done { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul.done li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
ul.done li::before { content: "✓"; color: var(--ok); font-weight: 700; }

/* Progress of each assignment: a bar like a dimension line. */
.tz { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tz li { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; }
.tz b { font-weight: 650; }
.tz .count { font: 700 14px/1.6 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; }
.tz .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.tz .bar i { display: block; height: 100%; background: var(--ok); }
.tz .bar i.part { background: var(--accent); }
.tz p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 15px; }

/* Open items: number as on the old question list (answers by number still work). */
ol.q { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
ol.q > li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 16px 16px 12px; }
.q .body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.q .body p { margin: 0; }
.q .ask { font-weight: 600; }
.q .now { color: var(--muted); font-size: 15px; }
.tag { display: inline-block; font: 600 11px/1 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 4px 8px; width: fit-content; }

.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
th { font: 600 11px/1.3 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
td:first-child { font: 600 13px/1.6 var(--font-mono); white-space: nowrap; color: var(--muted); }

.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.cta a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid var(--rule); color: var(--ink); }
.cta a.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #1b1712); }
footer { color: var(--muted); font-size: 14px; border-top: 1px solid var(--rule); padding-top: 16px; }

@media (max-width: 480px) {
  ol.q > li { grid-template-columns: 1fr; }
}

details { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
details summary { cursor: pointer; font-weight: 650; }
details[open] summary { margin-bottom: 8px; }
details h3 { margin-top: 14px; }
details .note { margin: 4px 0 8px; }
