/* Primer landing page, laid out like the big course catalogs: a header with
 * search, a hero, the catalog in numbers, rows of course cards, subjects,
 * how it works, pricing, an FAQ and a large footer. Same system as the app
 * (app/styles.css): Instrument Sans, subject colours, the same course cards.
 * The app runs full-width; this page sits in a wide centred column. The two bundles are deployed separately, so the tokens and the
 * shared pieces (cards, status icons, progress bars) are repeated here rather
 * than shared.
 */

:root {
  --bg: #ffffff;
  --bg-2: #f4f4f1;
  --ink: #111111;
  --ink-2: #4b4d52;
  --ink-3: #8a8c91;
  --rule: #e2e2dd;
  --focus: #0b63ce;

  --c-physics: #d7261e;
  --c-math: #0b63ce;
  --c-chemistry: #00875a;
  --c-biology: #b98300;
  --c-cs: #c2185b;
  --c-engineering: #d86a0c;
  --c-astronomy: #22317a;
  --on-light: #ffffff;
  --on-dark: #111111;

  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 64px);
  --wrap: 1440px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e0f11;
  --bg-2: #18191c;
  --ink: #f2f2ee;
  --ink-2: #b7b9bd;
  --ink-3: #7c7f85;
  --rule: #2a2c31;
  --focus: #3b82e0;

  --c-physics: #e5392f;
  --c-math: #3b82e0;
  --c-chemistry: #16a36e;
  --c-biology: #d69a00;
  --c-cs: #e0457f;
  --c-engineering: #e8740f;
  --c-astronomy: #6f82e0;
  --on-light: #111111;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f11;
    --bg-2: #18191c;
    --ink: #f2f2ee;
    --ink-2: #b7b9bd;
    --ink-3: #7c7f85;
    --rule: #2a2c31;
    --focus: #3b82e0;

    --c-physics: #e5392f;
    --c-math: #3b82e0;
    --c-chemistry: #16a36e;
    --c-biology: #d69a00;
    --c-cs: #e0457f;
    --c-engineering: #e8740f;
    --c-astronomy: #6f82e0;
    --on-light: #111111;
    color-scheme: dark;
  }
}

[data-subject="physics"] {
  --accent: var(--c-physics);
  --accent-ink: var(--on-light);
}
[data-subject="math"] {
  --accent: var(--c-math);
  --accent-ink: var(--on-light);
}
[data-subject="chemistry"] {
  --accent: var(--c-chemistry);
  --accent-ink: var(--on-light);
}
[data-subject="biology"] {
  --accent: var(--c-biology);
  --accent-ink: var(--on-dark);
}
[data-subject="cs"] {
  --accent: var(--c-cs);
  --accent-ink: var(--on-light);
}
[data-subject="engineering"] {
  --accent: var(--c-engineering);
  --accent-ink: var(--on-dark);
}
[data-subject="astronomy"] {
  --accent: var(--c-astronomy);
  --accent-ink: var(--on-light);
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--ink);
  color: var(--bg);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
}

.skip:focus {
  top: 12px;
}

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

.label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.linkish {
  font-weight: 600;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.dot {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  background: var(--accent, var(--ink));
  border-radius: 50%;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 120ms ease-out,
    color 120ms ease-out;
}

.btn:hover {
  background: var(--bg-2);
}

.btn--primary {
  color: var(--bg);
  background: var(--ink);
}

.btn--primary:hover {
  color: var(--bg);
  background: var(--ink-2);
  border-color: var(--ink-2);
}

.btn--sm {
  padding: 5px 12px;
  font-size: 13px;
}

.btn--lg {
  padding: 13px 24px;
  font-size: 16px;
}

.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.iconbtn:hover {
  background: var(--bg-2);
}

.iconbtn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: none;
  }
  :root:not([data-theme="light"]) .icon-moon {
    display: block;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--bg);
  background: var(--ink);
  border-radius: 999px;
}

.badge--next {
  color: var(--accent-ink, var(--bg));
  background: var(--accent, var(--ink));
}

/* ---------------------------------------------------------------- header */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.bar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.brand__mark {
  width: 30px;
  height: 30px;
}

.brand__bg {
  fill: var(--ink);
}

.brand__a {
  fill: var(--bg);
}

.brand__b {
  fill: var(--c-math);
}

.brand__c {
  fill: var(--c-physics);
}

.bar__nav {
  display: flex;
  gap: 4px;
}

.bar__nav a {
  padding: 7px 14px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  color: var(--ink-2);
}

.bar__nav a:hover {
  color: var(--ink);
  background: var(--bg-2);
}

.bar__end {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.auth {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.account {
  position: relative;
}

.account__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px 3px 3px;
  background: transparent;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}

.account__btn:hover {
  border-color: var(--ink-3);
}

.account__initial {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  font-weight: 700;
  font-size: 13px;
  color: var(--bg);
  background: var(--ink);
  border-radius: 50%;
}

.account__initial img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account__plan {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 250px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.menu__who {
  padding: 10px 10px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
}

.menu__who strong {
  display: block;
  font-size: 14px;
}

.menu a {
  display: block;
  padding: 9px 10px;
  font-size: 14px;
  text-decoration: none;
  border-radius: 8px;
}

.menu a:hover {
  background: var(--bg-2);
}

/* -------------------------------------------------- progress and status */

.progress {
  display: block;
  flex: 1;
  min-width: 60px;
  height: 6px;
  overflow: hidden;
  background: var(--rule);
  border-radius: 3px;
}

.progress__bar {
  display: block;
  height: 100%;
  background: var(--accent, var(--ink));
  border-radius: 3px;
}

.status-icon {
  position: relative;
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  padding: 2px;
  border: 2px solid var(--ink-3);
  border-radius: 50%;
  background-clip: content-box;
}

.status-icon[data-status="in_progress"] {
  border-color: var(--accent, var(--ink));
  background-image: linear-gradient(90deg, var(--accent, var(--ink)) 50%, transparent 50%);
}

.status-icon[data-status="completed"] {
  padding: 0;
  background: var(--accent, var(--ink));
  border-color: var(--accent, var(--ink));
}

.status-icon[data-status="completed"]::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid var(--accent-ink, var(--bg));
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------------------------------------------------------------- search */

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -8px;
  border: 2px solid var(--ink-2);
  border-radius: 50%;
  pointer-events: none;
}

.search__icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  background: var(--ink-2);
  transform: rotate(45deg);
}

.search__input {
  width: 100%;
  min-width: 0;
  padding: 10px 18px 10px 42px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-2);
  border: 1.5px solid transparent;
  border-radius: 999px;
}

.search__input:hover {
  border-color: var(--rule);
}

.search__input:focus {
  background: var(--bg);
  border-color: var(--ink);
}

.search__input::placeholder {
  color: var(--ink-3);
}

.search--bar {
  flex: 1;
  max-width: 440px;
}

.search--hero {
  display: none;
  max-width: 520px;
  margin: 0 0 18px;
}

.search--hero .search__input {
  padding-top: 13px;
  padding-bottom: 13px;
  font-size: 16px;
}

.auth__link {
  padding: 7px 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.auth__link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  padding-top: clamp(40px, 6vw, 88px);
  padding-bottom: clamp(40px, 6vw, 88px);
}

.hero h1 {
  max-width: 12ch;
  margin: 0 0 20px;
  font-size: clamp(46px, 6.4vw, 96px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero__lede {
  max-width: 52ch;
  margin: 0 0 28px;
  font-size: 19px;
  color: var(--ink-2);
}

/* A course in progress, drawn with the same pieces as the app's cards. */
.preview {
  width: 100%;
  max-width: 560px;
  justify-self: end;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 20px;
}

.preview .cover {
  height: 150px;
}

.preview__body {
  padding: 20px 24px 22px;
}

.preview__body .card__subject {
  margin: 0;
}

.preview__title {
  margin: 8px 0 14px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.preview__progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--ink-2);
}

.preview__progress b {
  color: var(--ink);
}

.preview__sections {
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview__sections li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 15px;
  font-weight: 600;
  border-top: 1px solid var(--rule);
}

.preview__sections li > span:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

/* ---------------------------------------------------------------- stats */

.stats {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
}

.stats__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
  padding-top: 26px;
  padding-bottom: 26px;
}

.stats__row div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.stats dt {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.stats dd {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- blocks */

.block {
  padding-top: clamp(56px, 6vw, 88px);
  padding-bottom: clamp(24px, 3vw, 40px);
}

.block__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.block__head h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.block__head p {
  max-width: 60ch;
  margin: 0;
  color: var(--ink-2);
}

.block__more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 28px;
}

.band {
  padding: clamp(56px, 6vw, 88px) 0;
  background: var(--bg-2);
}

.block + .band {
  margin-top: clamp(40px, 5vw, 64px);
}

.band + .block {
  padding-bottom: clamp(56px, 6vw, 88px);
}

/* Tabs, like the "most popular / new" switch on big catalogs. */
.tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--rule);
}

.tab {
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ----------------------------------------------------------------- cards */

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.grid > li {
  display: flex;
}

.card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 16px;
  transition:
    border-color 120ms ease-out,
    transform 120ms ease-out;
}

.card:hover {
  border-color: var(--ink-3);
  transform: translateY(-2px);
}

.card:hover .card__title {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* The cover stands in for a course photo: the subject's colour with its
   line drawing (--motif, below) in the cover's text colour. */
.cover {
  position: relative;
  display: block;
  flex: none;
  height: 128px;
  color: var(--accent-ink, var(--bg));
  background: var(--accent, var(--ink));
}

.cover::after {
  content: "";
  position: absolute;
  inset: 12px 14px 10px 30%;
  background: currentColor;
  opacity: 0.9;
  -webkit-mask: var(--motif) right center / contain no-repeat;
  mask: var(--motif) right center / contain no-repeat;
}

.cover__badges {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 1;
  display: flex;
  gap: 6px;
}

.cover .badge {
  color: var(--ink);
  background: var(--bg);
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.card__subject {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.card__title {
  margin-top: 8px;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.card__learn {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card__learn b {
  font-weight: 600;
  color: var(--ink);
}

.card__foot {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.card__progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card__progress .label {
  white-space: nowrap;
}

/* Cover drawings, one per subject, used as masks so they take the
   cover's text colour in both themes. Generated: keep both
   stylesheets in step when editing. */
[data-subject="physics"] {
  --motif: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 240 120%27%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M40 112Q140 -40 236 112%27/%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M20 112H240%27/%3E%3Ccircle cx=%2764%27 cy=%2780%27 r=%275%27 fill=%27black%27/%3E%3Ccircle cx=%2792%27 cy=%2754%27 r=%275%27 fill=%27black%27/%3E%3Ccircle cx=%27120%27 cy=%2740%27 r=%275%27 fill=%27black%27/%3E%3Ccircle cx=%27148%27 cy=%2738%27 r=%275%27 fill=%27black%27/%3E%3Ccircle cx=%27176%27 cy=%2750%27 r=%275%27 fill=%27black%27/%3E%3Ccircle cx=%27204%27 cy=%2774%27 r=%275%27 fill=%27black%27/%3E%3C/svg%3E");
}
[data-subject="math"] {
  --motif: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 240 120%27%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M96 12V110H236%27/%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M96 96C136 96 150 24 190 24S228 60 236 70%27/%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-dasharray=%276 7%27 d=%27M146 24H236%27/%3E%3Ccircle cx=%27190%27 cy=%2724%27 r=%275%27 fill=%27black%27/%3E%3C/svg%3E");
}
[data-subject="chemistry"] {
  --motif: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 240 120%27%3E%3Cpolygon fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 points=%27150.0,26.0 179.4,43.0 179.4,77.0 150.0,94.0 120.6,77.0 120.6,43.0%27/%3E%3Cpolygon fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 points=%27208.9,26.0 238.3,43.0 238.3,77.0 208.9,94.0 179.5,77.0 179.5,43.0%27/%3E%3Ccircle fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 cx=%27150%27 cy=%2760%27 r=%2718%27/%3E%3C/svg%3E");
}
[data-subject="biology"] {
  --motif: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 240 120%27%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M90 30C120 30 120 90 150 90S180 30 210 30 240 90 240 90%27/%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M90 90C120 90 120 30 150 30S180 90 210 90 240 30 240 30%27/%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M105 36V84%27/%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M135 36V84%27/%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M165 36V84%27/%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M195 36V84%27/%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M225 36V84%27/%3E%3C/svg%3E");
}
[data-subject="cs"] {
  --motif: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 240 120%27%3E%3Cg fill=%27none%27 stroke=%27black%27 stroke-width=%276%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M130 26L96 60L130 94%27/%3E%3Cpath d=%27M202 26L236 60L202 94%27/%3E%3Cpath d=%27M180 16L152 104%27/%3E%3C/g%3E%3C/svg%3E");
}
[data-subject="engineering"] {
  --motif: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 240 120%27%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M70 96H240M100 40H240%27/%3E%3Cpath fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M70 96L100 40L128 96L156 40L184 96L212 40L240 96%27/%3E%3Ccircle cx=%2770%27 cy=%2796%27 r=%275%27 fill=%27black%27/%3E%3C/svg%3E");
}
[data-subject="astronomy"] {
  --motif: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 240 120%27%3E%3Cellipse fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 cx=%27170%27 cy=%2764%27 rx=%2768%27 ry=%2724%27 transform=%27rotate%28-16 170 64%29%27/%3E%3Ccircle cx=%27170%27 cy=%2764%27 r=%2717%27 fill=%27black%27/%3E%3Ccircle cx=%27235%27 cy=%2745%27 r=%276%27 fill=%27black%27/%3E%3Ccircle cx=%2796%27 cy=%2720%27 r=%272.5%27 fill=%27black%27/%3E%3Ccircle cx=%27120%27 cy=%27104%27 r=%272.5%27 fill=%27black%27/%3E%3Ccircle cx=%27222%27 cy=%27104%27 r=%272.5%27 fill=%27black%27/%3E%3Ccircle cx=%27120%27 cy=%2740%27 r=%272.5%27 fill=%27black%27/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------- subjects */

.subjects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subject {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  text-decoration: none;
  border: 1px solid var(--rule);
  border-left: 6px solid var(--accent, var(--ink));
  border-radius: 12px;
  transition: background 120ms ease-out;
}

.subject:hover {
  background: var(--bg-2);
}

.subject .dot {
  display: none;
}

.subject__name {
  flex: 1;
  font-weight: 650;
}

.subject__count {
  white-space: nowrap;
}

/* ---------------------------------------------------------- how it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 24px;
  background: var(--bg);
  border-radius: 18px;
}

.step h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 8px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  color: var(--ink-2);
}

.step__no {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--bg);
  background: var(--ink);
  border-radius: 50%;
}

/* Each step is illustrated with a real piece of the app. */
.step__art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 120px;
  background: var(--bg-2);
  border-radius: 12px;
}

.step__art--card {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 70%;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--rule);
}

.step__art--card .cover {
  height: 64px;
}

.step__lines {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.step__lines i {
  height: 8px;
  background: var(--rule);
  border-radius: 4px;
}

.step__lines i:last-child {
  width: 60%;
}

.step__art--status .status-icon {
  width: 34px;
  height: 34px;
  padding: 4px;
  border-width: 3px;
}

.step__art--status .status-icon[data-status="completed"] {
  padding: 0;
}

.step__art--status .status-icon[data-status="completed"]::after {
  left: 10px;
  top: 4px;
  width: 8px;
  height: 15px;
  border-width: 0 3px 3px 0;
}

.step__art--progress {
  flex-direction: column;
  gap: 10px;
  padding: 0 32px;
}

.step__art--progress .progress {
  flex: none;
  width: 100%;
  height: 10px;
  border-radius: 5px;
}

.step__caption {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* -------------------------------------------------------------- pricing */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* The pricing section is centred: heading over two plans of equal width. */
.block--center .block__head {
  align-items: center;
  text-align: center;
}

.block--center .plans {
  max-width: 960px;
  margin: 0 auto;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 26px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 20px;
}

.plan--premium {
  border: 2px solid var(--ink);
}

.plan__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}

.plan__blurb {
  margin: 12px 0 18px;
  color: var(--ink-2);
}

.plan__features {
  flex: 1;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.plan__features li {
  position: relative;
  padding: 8px 0 8px 28px;
  border-top: 1px solid var(--rule);
}

/* A small check, drawn the same way as a done section's. */
.plan__features li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  width: 5px;
  height: 10px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.plan__actions {
  display: grid;
  gap: 10px;
}

.plan__current {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

.plan__current a {
  color: var(--ink);
}

/* ------------------------------------------------------------------- faq */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px 64px;
  align-items: start;
}

.faq__list {
  border-top: 2px solid var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-size: 18px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  max-width: 64ch;
  margin: 0;
  padding: 0 4px 20px;
  color: var(--ink-2);
}

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

.foot {
  border-top: 1px solid var(--rule);
}

.foot__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 56px 0 40px;
}

.foot__brand p {
  max-width: 32ch;
  margin: 12px 0 0;
  color: var(--ink-2);
}

.foot__col h2 {
  margin: 4px 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foot__col ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot__col a {
  font-size: 15px;
  text-decoration: none;
  color: var(--ink-2);
}

.foot__col a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 28px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
}

.foot__base a {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.version:not(:empty)::before {
  content: "\00b7  ";
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bar__nav {
    display: none;
  }
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview {
    justify-self: start;
  }

  .stats__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 22px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The header search gives way to a big one in the hero. */
@media (max-width: 900px) {
  .search--bar {
    display: none;
  }

  .search--hero {
    display: flex;
  }

  .bar__end {
    margin-left: auto;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .bar__inner {
    gap: 12px;
  }

  .brand__name,
  .account__plan,
  .auth__link {
    display: none;
  }

  .foot__brand .brand__name {
    display: inline;
  }

  .hero__lede {
    font-size: 17px;
  }

  .search--hero .btn {
    display: none;
  }

  .preview .cover {
    height: 110px;
  }

  .stats__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .tab {
    padding: 10px 12px;
  }

  .foot__cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: 40px;
  }
}

@media (max-width: 760px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
