/* dfd.academy
 *
 * Same world as the app it leads into: a light ground, one violet accent and
 * Manrope. It used to be set as a datasheet in monospace, which suited the
 * claim that every figure was counted but made a place for learning look like
 * a spec sheet.
 *
 * The numbers stay the hero — the table is still the first thing on the page —
 * they are simply no longer dressed as machine output. Committed to one light
 * theme on purpose, painted explicitly, so it matches the app on any OS.
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --paper: #f5f5fc;
  --panel: #ffffff;
  --ink: #15162b;
  --ink-2: #5c5e7e;
  --ink-3: #8a8ca8;
  --rule: #e8e9f5;
  --rule-firm: #d6d7ea;
  --blue: #5b34ea;
  --blue-soft: #efebff;
  --flag: #f04438;
  --ok: #12b76a;

  --r: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px rgba(21, 22, 43, .04), 0 4px 12px rgba(91, 52, 234, .05);
  --shadow-2: 0 2px 6px rgba(21, 22, 43, .06), 0 16px 32px rgba(91, 52, 234, .10);

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---- masthead: a document header, ruled top and bottom ---- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0 12px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 56px;
}

/* The page is called by its name, not by a slogan. There is no hero here: the
   first thing on the page is the table, because the table is what the page is. */
.who {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.note {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--ink-2);
}

/* ---- opening ---- */

header { margin-bottom: 64px; }


.lead {
  font-size: 18px;
  line-height: 1.55;
  /* Ширина задана в пикселях, а не в ch: ch — это ширина нуля, который в
     пропорциональном шрифте шире среднего знака, и 68ch давало строку в
     девяносто знаков вместо обещанных шестидесяти восьми. */
  max-width: 620px;
  margin: 0 0 20px;
}

header p { max-width: 560px; color: var(--ink-2); margin: 0 0 16px; }

/* A notice, not a pull quote. The left edge is heavier so the block reads as
   set apart, but it stays the same grey as the rest of the rule: a coloured
   rail down the side is the decoration this page is trying not to have. */
.access {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-left-width: 3px;
  padding: 14px 16px;
  max-width: 560px;
}

/* ---- section marks ---- */

h2 {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 64px 0 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

/* ---- a course, set as a catalogue entry ---- */

.course {
  border-bottom: 1px solid var(--rule);
  padding: 34px 0 30px;
}

.course .head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.course h3 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 640;
  margin: 0;
}

.course p { max-width: 580px; margin: 0 0 14px; color: var(--ink-2); }
.course p:first-of-type { color: var(--ink); }

/* Status, as a stamped mark rather than a rounded pill. */
.pill {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  padding: 4px 8px;
  white-space: nowrap;
}
.pill.live { color: var(--ok); border-color: currentColor; }

/* ---- the figures: the point of the page ---- */

.counts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 22px 0 20px;
  border-top: 1px solid var(--rule);
}

.counts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}

.counts dt {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}

.counts dd {
  margin: 0;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ---- defects, flagged ---- */

.defects { margin: 6px 0 0; padding: 0; list-style: none; }

.defects li {
  position: relative;
  padding: 7px 0 7px 26px;
  font-size: 15px;
  color: var(--ink-2);
  border-bottom: 1px dotted var(--rule);
}

.defects li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 7px;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  color: var(--flag);
}

.defects.fixed li::before { content: "\2713"; color: var(--ok); }

/* ---- the one action per entry ---- */

.cta { margin: 18px 0 4px; }

.button {
  display: inline-block;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  border: 1.5px solid var(--rule-firm);
  padding: 10px 16px;
  min-height: 44px;
  line-height: 24px;
  transition: background-color .12s, color .12s;
}

.button:hover,
.button:focus-visible {
  background: var(--rule-firm);
  color: var(--paper);
}

/* ---- links ---- */

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* ---- repository paths, printed as text because they are not links ---- */

.repo {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 10px 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.small { font-size: 13.5px; color: var(--ink-3); }

/* ---- foot ---- */

.foot {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1.5px solid var(--rule-firm);
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--ink-2);
}

ul:not(.defects) { max-width: 580px; color: var(--ink-2); padding-left: 20px; }
ul:not(.defects) li { margin-bottom: 6px; }

h4 {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 22px 0 6px;
}

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (min-width: 760px) {
  .counts { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  /* With two columns the top rule would only span the first, so each cell
     carries its own top edge instead. */
  .counts { border-top: 0; }
  .counts > div { border-top: 1px solid var(--rule); border-bottom: 0; }
}

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

/* Commands and repository paths. Long git lines pushed the whole page 383px
   sideways on a phone, because a bare <code> neither wraps nor scrolls on its
   own — the page body must never be the thing that scrolls horizontally. */
code, pre {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  line-height: 1.6;
}

pre, .repo, p > code {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: anywhere;
  -webkit-overflow-scrolling: touch;
}

pre {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  margin: 12px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---- the index: this is the page ---- */

.index {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 10px;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
}

.index caption {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: 10px;
}

.index th,
.index td {
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-weight: 400;
  white-space: nowrap;
}

.index thead th {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
}

.index tbody th {
  font-weight: 600;
  padding-right: 24px;
  white-space: normal;
}

/* Figures line up in a column, which is the only reason a table beats prose
   here; tabular-nums keeps the digits on the same rhythm as the rules. */
.index .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding-right: 20px;
}

/* A dash is an absence of the concept, not an absence of data, so it is set
   quieter than a figure rather than looking like a gap in the table. */
.index .none { color: var(--ink-3); }

.index tbody tr:last-child th,
.index tbody tr:last-child td { border-bottom: 1px solid var(--rule); }

.tablenote { max-width: 620px; margin: 0 0 12px; }

@media (max-width: 620px) {
  /* Six columns will not fit a phone, and shrinking the type to make them fit
     makes the figures unreadable. The table scrolls inside its own box. */
  .index-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .index { font-size: 12.5px; }
  .index th, .index td { padding-right: 14px; }
  .index .n { padding-right: 12px; }
}

/* ---------------------------------------------------------------------------
   Same shapes as the app: panels with a soft edge instead of horizontal rules,
   pills that are actually pill-shaped, and one violet doing the accenting.
--------------------------------------------------------------------------- */

.course {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 26px 26px 22px;
  margin-bottom: 18px;
  transition: box-shadow .2s ease, border-color .2s ease;
}

.course:hover {
  border-color: #d9d0ff;
  box-shadow: var(--shadow-2);
}

.pill {
  border-radius: 999px;
  padding: 4px 11px;
  background: var(--paper);
}

.pill.live {
  color: #0b7c47;
  background: #e7f8f0;
  border-color: transparent;
}

.counts {
  border-top: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 4px 14px;
}

.counts > div:last-child { border-bottom: 0; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: var(--r);
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  border: 0;
  box-shadow: 0 6px 16px rgba(91, 52, 234, .22);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.button:hover {
  background: #4a29c9;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(91, 52, 234, .28);
}

.index {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.index th,
.index td { border-color: var(--rule); }

.index tbody tr:hover { background: var(--blue-soft); }

a { color: var(--blue); }

.top { border-bottom: 0; }

.who { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
