/*
 * The landing template's layout.
 *
 * NOTE: LAYOUT ONLY. Not one colour, blur, radius value, shadow or duration is defined in this
 *   file. Colour and glass come from the product's own stylesheets in `vendor/`, untouched,
 *   and everything here refers to the product's tokens by name. The owner's rule for this
 *   work is that colour and glass are not changed; a literal here would be the first place
 *   that rule broke.
 *
 * NOTE: GLASS CANNOT SAMPLE GLASS. Three surfaces are `.mat` (the header bar, the hero window,
 *   the closing panel) and nothing is ever placed inside one that blurs. None of them is
 *   transformed. The cards on the page ground are `.mat-inset`, which is how the product
 *   draws a card that sits on the ground.
 *
 * Prefix `ld-` throughout, so nothing here can collide with the product's own classes when
 * this moves into the frontend.
 */

:root {
  --ld-max: var(--container-xl);
  --ld-gutter: var(--space-4);
  --ld-section: calc(var(--space-9) * 1.5);
  --ld-header-offset: calc(var(--control-lg) + var(--space-3) * 3);
  scroll-padding-top: var(--ld-header-offset);
}

@media (min-width: 48rem) {
  :root {
    --ld-gutter: var(--space-7);
    --ld-section: calc(var(--space-9) * 2);
  }
}

html {
  scroll-behavior: smooth;
}

/* NOTE: THE PRODUCT'S `html, body { height: 100% }` WOULD UNSTICK THE HEADER. That rule
   suits the app, whose screens scroll inside their own panes; on this page the document
   itself scrolls, and a sticky header cannot travel past the end of its parent. With the
   body exactly one viewport tall, the bar scrolled away after the first screen. Here the
   body grows with the page, so the bar stays at the top however far the reader goes. */
body {
  block-size: auto;
  min-block-size: 100%;
}

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

.ld-main {
  position: relative;
  outline: none;
}

.ld-main > *,
.ld-footer {
  inline-size: min(100% - var(--ld-gutter) * 2, var(--ld-max));
  margin-inline: auto;
}

/* ---------------------------------------------------------------------------------
   Skip link
   --------------------------------------------------------------------------------- */

.ld-skip {
  position: fixed;
  inset-block-start: var(--space-2);
  inset-inline-start: var(--space-2);
  z-index: var(--z-skip);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  color: var(--text);
  transform: translateY(-200%);
}

.ld-skip:focus-visible {
  transform: none;
}

/* ---------------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------------- */

.ld-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-topbar);
  padding-block: var(--space-3);
  padding-inline: var(--ld-gutter);
}

.ld-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  inline-size: min(100%, var(--ld-max));
  margin-inline: auto;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
}

.ld-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  text-decoration: none;
  font-weight: var(--weight-strong);
  font-size: var(--text-md);
  letter-spacing: var(--tracking-snug);
  border-radius: var(--r-sm);
}

.ld-brand__mark {
  inline-size: var(--control-sm);
  block-size: var(--control-sm);
}

.ld-nav {
  display: none;
}

.ld-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-inline-start: auto;
}

.ld-header__signin {
  display: none;
}

.ld-lang {
  display: flex;
  gap: var(--space-1);
}

/* The switch sits in the bar on a desktop and inside the menu on anything narrower, where
   three more controls in the bar would push it past the edge of a 280px screen. */
.ld-lang--bar {
  display: none;
}

.ld-lang--menu {
  padding: var(--space-2) var(--space-3) var(--space-1);
  border-block-start: 1px solid var(--border-subtle);
}

@media (min-width: 80rem) {
  .ld-lang--bar {
    display: flex;
  }

  .ld-nav .ld-lang--menu {
    display: none;
  }
}

.ld-lang__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: var(--control-sm);
  min-block-size: var(--control-sm);
  border-radius: var(--r-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  color: var(--text-secondary);
  text-decoration: none;
}

.ld-lang__item[aria-current] {
  color: var(--text);
}

.ld-lang__item:hover {
  color: var(--text);
}

/* The small-screen menu. It hangs under the bar, so it is outside the material's box and
   gets an opaque surface of its own rather than a second blur. */
@media (max-width: 79.99rem) {
  .ld-nav[data-open="true"] {
    position: absolute;
    inset-inline: 0;
    inset-block-start: calc(100% + var(--space-2));
    display: grid;
    gap: var(--space-1);
    padding: var(--space-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    background: var(--surface-1);
  }

  .ld-nav[data-open="true"] .ld-nav__link {
    padding: var(--space-3) var(--space-3);
  }
}

@media (min-width: 80rem) {
  .ld-nav {
    display: flex;
    gap: var(--space-1);
    margin-inline-start: var(--space-4);
  }

  .ld-nav .ld-nav__link--signin,
  .ld-header__actions .ld-menu-btn {
    display: none;
  }

  .ld-header__signin {
    display: inline-flex;
  }
}

.ld-nav__link {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--control-md);
  padding-inline: var(--space-3);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.ld-nav__link:hover {
  color: var(--text);
}

/* Below 30rem the bar keeps the mark, one action and the menu. */
@media (max-width: 29.99rem) {
  .ld-header .ld-brand__name {
    display: none;
  }
}

/* `hidden` is an HTML attribute and an SVG element does not honour it everywhere. */
[data-appearance-toggle] svg[hidden] {
  display: none;
}

/* ---------------------------------------------------------------------------------
   Shared text
   --------------------------------------------------------------------------------- */

.ld-eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--brand-text);
}

.ld-head {
  max-inline-size: var(--measure-prose);
  margin-block-end: var(--space-8);
}

.ld-head__title {
  margin: 0;
  font-size: var(--text-display);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-3xl);
  font-weight: var(--weight-bold);
  text-wrap: balance;
}

.ld-head__lede {
  margin: var(--space-4) 0 0;
  max-inline-size: var(--measure-lede);
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
}

.ld-section {
  padding-block: var(--ld-section) 0;
}

/* A heading column beside a list. Stacked on a phone; the aside sticks on a desktop so the
   question stays in view while its answers scroll past. */
.ld-split {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 64rem) {
  .ld-split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-9);
    align-items: start;
  }

  .ld-split__aside {
    position: sticky;
    inset-block-start: calc(var(--ld-header-offset) + var(--space-6));
  }

  .ld-split .ld-head {
    margin-block-end: 0;
  }
}

/* ---------------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------------- */

.ld-hero {
  display: grid;
  gap: var(--space-9);
  align-items: center;
  padding-block: var(--space-8) var(--space-6);
}

@media (min-width: 64rem) {
  .ld-hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
    gap: var(--space-8);
    padding-block: var(--space-9) var(--space-8);
    min-block-size: calc(100svh - var(--ld-header-offset) - var(--space-9));
  }
}

.ld-hero__text {
  min-inline-size: 0;
}

.ld-hero__title {
  margin: 0;
  font-size: var(--text-display-lg);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  font-weight: var(--weight-bold);
  max-inline-size: 18ch;
  text-wrap: balance;
}

.ld-hero__lede {
  margin: var(--space-6) 0 0;
  max-inline-size: var(--measure-lede);
  color: var(--text-secondary);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.ld-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-block-start: var(--space-8);
}

.ld-hero__note {
  margin: var(--space-3) 0 0;
  color: var(--text-tertiary);
}

.ld-hero__note[hidden],
[data-signup][hidden],
[data-signup-closed][hidden] {
  display: none;
}

/* The hero window. */
.ld-mock {
  margin: 0;
  min-inline-size: 0;
}

.ld-mock__window {
  padding: var(--space-4);
}

@media (min-width: 48rem) {
  .ld-mock__window {
    padding: var(--space-5) var(--space-6) var(--space-6);
  }
}

.ld-mock__bar {
  display: flex;
  justify-content: center;
  margin-block-end: var(--space-4);
}

.ld-mock__address {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--r-pill);
  background: var(--surface-sunken);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.ld-mock__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-block-end: var(--space-4);
}

.ld-mock__screen {
  display: block;
  font-weight: var(--weight-strong);
  font-size: var(--text-md);
}

.ld-mock__group {
  display: block;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.ld-mock__grid {
  display: grid;
  grid-template-columns: auto repeat(5, minmax(0, 1fr));
  gap: var(--space-1);
  align-items: stretch;
}

.ld-mock__day {
  padding-block-end: var(--space-1);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-align: center;
}

.ld-mock__time {
  padding-inline-end: var(--space-2);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  align-self: center;
}

.ld-mock__lesson,
.ld-mock__free {
  min-inline-size: 0;
  min-block-size: var(--control-md);
  border-radius: var(--r-xs);
}

.ld-mock__lesson {
  display: flex;
  align-items: center;
  padding-inline: var(--space-2);
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ld-mock__lesson--placed {
  border-color: var(--brand-border);
  background: var(--brand-subtle);
  color: var(--brand-text);
  font-weight: var(--weight-medium);
}

.ld-mock__free {
  border: 1px dashed var(--border-subtle);
}

.ld-mock__placed {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: var(--space-3) 0 0;
  color: var(--brand-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.ld-mock__caption {
  margin-block-start: var(--space-3);
  color: var(--text-tertiary);
  text-align: center;
}

/* A phone shows three days rather than five unreadable ones. */
@media (max-width: 29.99rem) {
  .ld-mock__grid {
    grid-template-columns: auto repeat(3, minmax(0, 1fr));
  }

  .ld-mock__grid [data-narrow="hide"] {
    display: none;
  }
}

/* ---------------------------------------------------------------------------------
   Features: a bento with one lead tile
   --------------------------------------------------------------------------------- */

.ld-bento {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 40rem) {
  .ld-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ld-tile--lead {
    grid-column: 1 / -1;
  }

  /* Five tiles under a full-width lead: the last one takes the whole row, so no cell
     is left empty. */
  .ld-tile[data-slot="4"] {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .ld-bento {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .ld-tile--lead {
    grid-column: span 7;
    grid-row: span 2;
  }

  .ld-tile[data-slot="0"],
  .ld-tile[data-slot="1"] {
    grid-column: span 5;
  }

  .ld-tile[data-slot="2"],
  .ld-tile[data-slot="3"],
  .ld-tile[data-slot="4"] {
    grid-column: span 4;
  }
}

.ld-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-inline-size: 0;
  padding: var(--space-6);
}

.ld-tile--lead {
  gap: var(--space-4);
  padding: var(--space-7);
}

.ld-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--control-lg);
  block-size: var(--control-lg);
  border-radius: var(--r-sm);
  background: var(--brand-subtle);
  color: var(--brand-text);
}

.ld-tile__title {
  margin: 0;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-snug);
}

.ld-tile__title--lead {
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-2xl);
}

.ld-tile__body {
  margin: 0;
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.ld-tile--lead .ld-tile__body {
  max-inline-size: var(--measure-lede);
  font-size: var(--text-md);
}

.ld-checks {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ld-checks li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.ld-checks svg {
  flex: none;
  margin-block-start: var(--space-1);
  color: var(--success);
}

/* One row of a week, one lesson placed by the solver. Shapes only. */
.ld-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--space-1);
  margin-block-start: auto;
  padding-block-start: var(--space-4);
}

.ld-strip__cell {
  block-size: var(--space-7);
  border-radius: var(--r-xs);
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
}

.ld-strip__cell[data-kind="free"] {
  border-style: dashed;
  background: none;
}

.ld-strip__cell[data-kind="placed"] {
  border-color: var(--brand-border);
  background: var(--brand-subtle);
}

/* ---------------------------------------------------------------------------------
   Segments: an index, not a card grid
   --------------------------------------------------------------------------------- */

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

.ld-segment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-6);
  border-block-start: 1px solid var(--border-subtle);
}

.ld-segment:last-child {
  border-block-end: 1px solid var(--border-subtle);
}

.ld-segment__icon {
  display: inline-flex;
  color: var(--text-secondary);
  padding-block-start: var(--space-1);
}

.ld-segment--lead .ld-segment__icon {
  color: var(--brand-text);
}

.ld-segment__title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-strong);
  line-height: var(--leading-snug);
}

.ld-segment--lead .ld-segment__title {
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-2xl);
}

.ld-segment__body {
  margin: var(--space-2) 0 0;
  max-inline-size: var(--measure-prose);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.ld-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.ld-tag {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

/* ---------------------------------------------------------------------------------
   Compare
   --------------------------------------------------------------------------------- */

.ld-compare {
  position: relative;
  padding: var(--space-2) var(--space-6);
}

.ld-compare__table {
  inline-size: 100%;
  border-collapse: collapse;
  text-align: start;
}

.ld-compare__table th,
.ld-compare__table td {
  padding: var(--space-5) var(--space-4) var(--space-5) 0;
  vertical-align: top;
  text-align: start;
  line-height: var(--leading-relaxed);
}

.ld-compare__table thead th {
  padding-block: var(--space-4);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.ld-compare__table tbody tr {
  border-block-start: 1px solid var(--border-subtle);
}

.ld-compare__table tbody th {
  font-weight: var(--weight-strong);
  inline-size: 22%;
}

.ld-compare__table td {
  color: var(--text-secondary);
}

.ld-compare__table td.ld-compare__after {
  color: var(--text);
}

.ld-compare__table td.ld-compare__after svg {
  display: inline-block;
  vertical-align: -0.15em;
  margin-inline-end: var(--space-2);
  color: var(--success);
}

.ld-compare__table thead th.ld-compare__after {
  color: var(--brand-text);
}

/* On a phone each row becomes a small block, and each cell names its own column. */
@media (max-width: 47.99rem) {
  .ld-compare {
    padding: var(--space-2) var(--space-4);
  }

  .ld-compare__table thead {
    display: none;
  }

  .ld-compare__table,
  .ld-compare__table tbody,
  .ld-compare__table tr,
  .ld-compare__table th,
  .ld-compare__table td,
  .ld-compare__table tbody th {
    display: block;
    inline-size: auto;
  }

  .ld-compare__table tbody tr {
    padding-block: var(--space-4);
  }

  .ld-compare__table tbody tr:first-child {
    border-block-start: 0;
  }

  .ld-compare__table th,
  .ld-compare__table td {
    padding: var(--space-1) 0;
  }

  .ld-compare__table td::before {
    content: attr(data-label);
    display: block;
    color: var(--text-tertiary);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
  }
}

/* ---------------------------------------------------------------------------------
   Steps
   --------------------------------------------------------------------------------- */

.ld-steps {
  display: grid;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

@media (min-width: 48rem) {
  .ld-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-7);
  }
}

.ld-step {
  padding-block-start: var(--space-5);
  border-block-start: 1px solid var(--border);
}

.ld-step__num {
  display: block;
  color: var(--brand-text);
  font-size: var(--text-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}

.ld-step__title {
  margin: var(--space-4) 0 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-strong);
}

.ld-step__body {
  margin: var(--space-2) 0 0;
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ---------------------------------------------------------------------------------
   Trust: plain, editorial, no cards
   --------------------------------------------------------------------------------- */

.ld-trust {
  display: grid;
  gap: var(--space-7) var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .ld-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .ld-trust {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ld-trust__icon {
  display: inline-flex;
  color: var(--brand-text);
}

.ld-trust__title {
  margin: var(--space-3) 0 0;
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
}

.ld-trust__body {
  margin: var(--space-2) 0 0;
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ---------------------------------------------------------------------------------
   FAQ
   --------------------------------------------------------------------------------- */

.ld-faq__item {
  border-block-end: 1px solid var(--border-subtle);
}

.ld-faq__item:first-child {
  border-block-start: 1px solid var(--border-subtle);
}

.ld-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-block-size: var(--control-lg);
  padding-block: var(--space-4);
  border-radius: var(--r-xs);
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  cursor: pointer;
  list-style: none;
}

.ld-faq__q::-webkit-details-marker {
  display: none;
}

.ld-faq__q:hover {
  color: var(--brand-text);
}

.ld-faq__q svg {
  flex: none;
  color: var(--text-tertiary);
  transition: transform var(--dur-base) var(--ease-out);
}

.ld-faq__item[open] .ld-faq__q svg {
  transform: rotate(180deg);
}

.ld-faq__a {
  margin: 0;
  padding-block-end: var(--space-5);
  max-inline-size: var(--measure-prose);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ---------------------------------------------------------------------------------
   Closing and footer
   --------------------------------------------------------------------------------- */

.ld-closing {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding: var(--space-9) var(--space-6);
  text-align: center;
}

.ld-closing__title {
  margin: 0;
  max-inline-size: 20ch;
  font-size: var(--text-display);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-3xl);
  font-weight: var(--weight-bold);
  text-wrap: balance;
}

.ld-closing__body {
  margin: 0 0 var(--space-3);
  max-inline-size: var(--measure-narrow);
  color: var(--text-secondary);
  font-size: var(--text-md);
}

.ld-footer {
  margin-block-start: var(--ld-section);
  padding-block: var(--space-8) var(--space-6);
  border-block-start: 1px solid var(--border-subtle);
}

/* The brand and its one sentence, then three equal link columns: product, who it is for
   and guides. The legal links sit in the bottom line beside the copyright. On a phone the description takes
   its own row and the links sit two to a row; from 48rem the four columns share a row
   under the description; from 64rem the description moves to the left of them. */
.ld-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-7) var(--space-6);
}

.ld-footer__about {
  grid-column: 1 / -1;
}

@media (min-width: 48rem) {
  .ld-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .ld-footer__grid {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: var(--space-7);
  }

  .ld-footer__about {
    grid-column: auto;
  }
}


.ld-footer__text {
  margin: var(--space-3) 0 0;
  max-inline-size: var(--measure-narrow);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.ld-footer__col {
  display: grid;
  align-content: start;
  gap: var(--space-2);
}

.ld-footer__col .label {
  margin: 0 0 var(--space-1);
}

.ld-footer__col a {
  justify-self: start;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--r-xs);
}

.ld-footer__col a:hover {
  color: var(--text);
}

.ld-footer__hint {
  margin: var(--space-1) 0 0;
  color: var(--text-tertiary);
  overflow-wrap: anywhere;
}

.ld-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  margin-block-start: var(--space-8);
  color: var(--text-tertiary);
}

.ld-footer__bottom p {
  margin: 0;
}

/* The copyright and the two legal links, side by side on one line. */
.ld-footer__fine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-5);
}

.ld-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.ld-footer__legal a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--control-xs);
  border-radius: var(--r-xs);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.ld-footer__legal a:hover {
  color: var(--text);
}

/* =================================================================================
   Sub-pages: segment pages, guides and the guide index
   ================================================================================= */

/* "Learn more" out of a home-page row or a guide card. */
.ld-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-block-start: var(--space-3);
  min-block-size: var(--control-sm);
  border-radius: var(--r-xs);
  color: var(--brand-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.ld-more svg {
  transition: transform var(--dur-fast) var(--ease-out);
}

.ld-more:hover svg,
a:hover > .ld-more svg {
  transform: translateX(var(--space-1));
}

/* Breadcrumb. */
.ld-crumbs {
  padding-block-start: var(--space-6);
}

.ld-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.ld-crumbs li + li::before {
  content: "/";
  margin-inline-end: var(--space-2);
  color: var(--text-tertiary);
}

.ld-crumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--r-xs);
}

.ld-crumbs a:hover,
.ld-crumbs [aria-current] {
  color: var(--text);
}

/* A sub-page hero is shorter than the home page's and never fills the viewport. */
@media (min-width: 64rem) {
  .ld-hero--sub {
    min-block-size: 0;
    padding-block: var(--space-8);
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

.ld-hero__title--sub {
  font-size: var(--text-display);
  max-inline-size: 22ch;
}

.ld-section--first {
  padding-block-start: var(--space-8);
}

/* The menu that kind of institution actually gets. */
.ld-menu-card {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  min-inline-size: 0;
}

.ld-menu-card .label,
.ld-menu-card__note {
  margin: 0;
}

.ld-menu-card__list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ld-menu-card__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.ld-menu-card__list svg {
  flex: none;
  margin-block-start: var(--space-1);
  color: var(--success);
}

.ld-menu-card__note {
  color: var(--text-tertiary);
}

/* A working week, before and after, as one ordered flow. */
.ld-flow {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ld-flow__item {
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-5);
  border-block-start: 1px solid var(--border-subtle);
}

.ld-flow__item:last-child {
  border-block-end: 1px solid var(--border-subtle);
}

.ld-flow__title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-strong);
}

.ld-flow__before,
.ld-flow__after {
  margin: 0;
  max-inline-size: var(--measure-prose);
  line-height: var(--leading-relaxed);
}

.ld-flow__before {
  color: var(--text-secondary);
}

.ld-flow__tag {
  display: block;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.ld-flow__after .ld-flow__tag {
  color: var(--brand-text);
}

/* A plain card grid, for a segment's modules. */
.ld-cards {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 40rem) {
  .ld-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .ld-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* What the product does not do for this kind, said plainly. */
.ld-limits {
  padding: var(--space-6);
}

.ld-limits__title {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
  font-weight: var(--weight-strong);
}

.ld-limits__list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-inline-start: var(--space-5);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Related pages. */
.ld-related__title {
  margin: 0 0 var(--space-5);
  font-size: var(--text-xl);
  font-weight: var(--weight-strong);
}

.ld-related {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .ld-related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .ld-related {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ld-related__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  block-size: 100%;
  box-sizing: border-box;
  padding: var(--space-4) var(--space-5);
  color: var(--text);
  text-decoration: none;
}

.ld-related__kind {
  grid-column: 1;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.ld-related__name {
  grid-column: 1;
  font-weight: var(--weight-strong);
}

.ld-related__link svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--brand-text);
  transition: transform var(--dur-fast) var(--ease-out);
}

.ld-related__link:hover svg {
  transform: translateX(var(--space-1));
}

/* ---------------------------------------------------------------------------------
   Guide article
   --------------------------------------------------------------------------------- */

.ld-article {
  padding-block-start: var(--space-7);
}

.ld-article__head {
  max-inline-size: var(--measure-prose);
}

.ld-article__title {
  margin: 0;
  font-size: var(--text-display);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-3xl);
  font-weight: var(--weight-bold);
  text-wrap: balance;
}

.ld-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
  color: var(--text-tertiary);
}

.ld-article__layout {
  display: grid;
  gap: var(--space-7);
  margin-block-start: var(--space-8);
}

@media (min-width: 64rem) {
  .ld-article__layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    gap: var(--space-9);
    align-items: start;
  }

  .ld-toc {
    position: sticky;
    inset-block-start: calc(var(--ld-header-offset) + var(--space-6));
  }
}

.ld-toc .label {
  margin: 0 0 var(--space-3);
}

.ld-toc ol {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.ld-toc li {
  counter-increment: toc;
}

.ld-toc a {
  display: flex;
  gap: var(--space-2);
  padding-block: var(--space-1);
  border-radius: var(--r-xs);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  text-decoration: none;
}

.ld-toc a::before {
  content: counter(toc);
  min-inline-size: 2ch;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.ld-toc a:hover {
  color: var(--text);
}

/* Prose: one measure, one rhythm. */
.ld-prose {
  min-inline-size: 0;
  max-inline-size: var(--measure-prose);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
}

.ld-prose h2 {
  margin: var(--space-8) 0 var(--space-3);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-2xl);
  font-weight: var(--weight-bold);
}

.ld-prose p,
.ld-prose ul,
.ld-prose ol {
  margin: 0 0 var(--space-4);
  color: var(--text-secondary);
}

.ld-prose ul,
.ld-prose ol {
  display: grid;
  gap: var(--space-2);
  padding-inline-start: var(--space-6);
}

.ld-prose .ld-faq {
  margin-block-end: var(--space-4);
}

.ld-prose .ld-faq__a {
  margin: 0;
}

.ld-prose .ld-note {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  background: var(--surface-sunken);
  color: var(--text);
}

/* The answer first: what a reader, and an answer engine, should take away. */
.ld-answer {
  padding: var(--space-5) var(--space-6);
}

.ld-prose .ld-answer .label {
  margin: 0 0 var(--space-2);
  color: var(--brand-text);
}

.ld-prose .ld-answer__text {
  margin: 0;
  color: var(--text);
}

.ld-table {
  position: relative;
  margin: 0 0 var(--space-5);
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
}

.ld-table table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.ld-table th,
.ld-table td {
  padding: var(--space-3) var(--space-4);
  border-block-start: 1px solid var(--border-subtle);
  text-align: start;
  vertical-align: top;
}

.ld-table thead th {
  border-block-start: 0;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.ld-table tbody th {
  font-weight: var(--weight-strong);
  color: var(--text);
}

.ld-table td {
  color: var(--text-secondary);
}

.ld-sources {
  font-size: var(--text-sm);
}

.ld-sources a {
  color: var(--brand-text);
  overflow-wrap: anywhere;
}

/* The product at the end of an article: one clear next step. */
.ld-product {
  margin-block-start: var(--space-8);
  padding: var(--space-6);
}

.ld-prose .ld-product__title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xl);
}

.ld-prose .ld-product p {
  margin: 0 0 var(--space-4);
}

.ld-product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------------------------------------------------------------------------------
   Guide index
   --------------------------------------------------------------------------------- */

.ld-guides {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .ld-guides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ld-guides__item--lead {
    grid-column: 1 / -1;
  }
}

.ld-guides__link {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  block-size: 100%;
  box-sizing: border-box;
  padding: var(--space-6);
  color: var(--text);
  text-decoration: none;
}

.ld-guides__title {
  margin: 0;
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  font-weight: var(--weight-strong);
}

.ld-guides__item--lead .ld-guides__title {
  font-size: var(--text-2xl);
}

.ld-guides__summary {
  margin: 0;
  max-inline-size: var(--measure-prose);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.ld-nav__link[aria-current] {
  color: var(--text);
}


/* ---------------------------------------------------------------------------------
   Narrow screens and long words
   ---------------------------------------------------------------------------------

   Russian and Azerbaijani carry single words wider than a 280px screen at display size
   ("корпоративного", "idarəetmə"). Hyphenation follows the page's `lang`, so the word
   breaks where that language breaks it, and `overflow-wrap` is the last resort for a
   word the dictionary does not know. */
.ld-hero__title,
.ld-head__title,
.ld-article__title,
.ld-closing__title,
.ld-prose h2,
.ld-tile__title,
.ld-segment__title,
.ld-flow__title,
.ld-guides__title,
.ld-related__name {
  hyphens: auto;
  overflow-wrap: break-word;
}

/* At the narrowest widths the bar holds the mark, the toggle, one button and the menu;
   a tighter gap and button padding keep the four inside it. */
@media (max-width: 23.99rem) {
  .ld-header__bar {
    gap: var(--space-2);
    padding-inline-start: var(--space-3);
  }

  .ld-header__actions {
    gap: var(--space-1);
  }

  .ld-header__actions .btn {
    padding-inline: var(--space-3);
  }

  /* A long call to action ("Бесплатная регистрация") may take two lines rather than
     push past the panel's edge. */
  .ld-closing,
  .ld-product {
    padding-inline: var(--space-4);
  }

  .ld-hero__actions .btn,
  .ld-closing .btn,
  .ld-product__actions .btn {
    white-space: normal;
    text-align: center;
  }
}

/* ---------------------------------------------------------------------------------
   Contact and social
   ---------------------------------------------------------------------------------

   Everything here renders only when `content/site.json` has a value for it, so with the
   file empty none of these elements exist on the page. */

/* The header button on a desktop; on anything narrower the same link lives in the menu. */
.ld-header__contact {
  display: none;
}

@media (min-width: 80rem) {
  .ld-header__contact {
    display: inline-flex;
  }

  .ld-nav .ld-nav__link--contact {
    display: none;
  }
}

/* The channels, under the closing call to action. */
.ld-contact {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  inline-size: 100%;
  margin-block-start: var(--space-6);
  padding-block-start: var(--space-6);
  border-block-start: 1px solid var(--border-subtle);
}

.ld-contact__title {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
}

.ld-channels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ld-channel {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--control-lg);
  padding-inline: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: var(--text-sm);
  text-decoration: none;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.ld-channel:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.ld-channel svg {
  flex: none;
  color: var(--brand-text);
}

.ld-channel__label {
  color: var(--text-tertiary);
}

.ld-channel__value {
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.ld-contact__note {
  margin: 0;
  color: var(--text-tertiary);
}

/* The same channels, and the social profiles, under the footer's description. */
.ld-footer__channels {
  display: grid;
  gap: var(--space-1);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.ld-footer__channels a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--control-xs);
  border-radius: var(--r-xs);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.ld-footer__channels a:hover {
  color: var(--text);
}

.ld-social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.ld-social--center {
  justify-content: center;
  margin-block-start: 0;
}

/* A contact element with no value behind it. `html` in front so this outranks the
   component rules that give buttons and links their own `display`. */
html [data-contact-off] {
  display: none;
}

/* ---------------------------------------------------------------------------------
   The exam landing's header: the app's language menu, and a menu of the bar's material
   ---------------------------------------------------------------------------------

   Only `landing/exam.mjs` renders these classes; the apex landing has none of them, so
   nothing above changes for it. Every value is a token, as everywhere in this file.

   THE SELECTOR IS THE APP'S `locale-menu` (design critique, 2026-10-29): its button,
   `.menu__panel` and `.menu__item` come from `vendor/app.css` unchanged. What is here only
   fits a `<details>` and links to those classes - the app's own menu is a button and
   buttons. */

/* On a desktop it sits in the bar; narrower, the menu panel holds it, as with the apex's switch. */
.ld-langsel--bar {
  display: none;
}

@media (min-width: 80rem) {
  .ld-langsel--bar {
    display: inline-flex;
  }
}

.ld-langsel > summary {
  list-style: none;
  cursor: pointer;
}

.ld-langsel > summary::-webkit-details-marker {
  display: none;
}

/* The app turns the chevron on `aria-expanded`; a `<details>` says it with `[open]`. */
.ld-langsel[open] .locale-menu__chevron {
  transform: rotate(180deg);
}

/* Open is the selected state of the button: it stays lit, as a pressed ghost button does. */
.ld-langsel[open] > .locale-menu__button {
  background: var(--surface-2);
}

/* A link drawn as the app's menu item. */
.ld-langsel .locale-menu__item {
  text-decoration: none;
}

/* The app marks the current language on `aria-checked`, which a link cannot carry; the page's own
   language is `aria-current="page"` here, marked the same way: colour, weight and the check. */
.ld-langsel .locale-menu__item[aria-current="page"] {
  color: var(--brand-strong);
  font-weight: var(--weight-strong);
}

.ld-langsel .locale-menu__item[aria-current="page"] .locale-menu__check {
  visibility: visible;
}

/* In the bar the panel opens under the BAR, not under the button: the bar's own padding below the
   button, then the same gap the narrow menu keeps under the bar. */
.ld-langsel--bar .locale-menu__panel {
  top: calc(100% + var(--space-2) * 2);
}

/* In the menu: the items open in the panel's own flow, so the panel grows and nothing is clipped.
   The row lines up with the links above it: the same inline start and the same height. */
.ld-langsel--menu {
  display: grid;
  padding-block-start: var(--space-1);
  border-block-start: 1px solid var(--border-subtle);
}

.ld-langsel--menu > .locale-menu__button {
  justify-content: flex-start;
  min-block-size: var(--control-md);
  padding: var(--space-3);
}

.ld-langsel--menu .ld-langsel__list {
  display: grid;
  gap: var(--space-1);
}

.ld-langsel--menu .locale-menu__item {
  padding: var(--space-3);
}

/* The narrow-screen menu. A sibling of the bar, not a child: positioned against the sticky header,
   under the bar, and the bar's own material, so it samples the page as the bar does - one level
   up (`data-level="3"`), the menu's elevation. In `material.css` level 3 differs from the bar's 2
   by its tint step (2.8 against 2), its blur variable and its deeper shadow. */
.ld-xmenu {
  display: none;
}

@media (max-width: 79.99rem) {
  .ld-xmenu[data-open="true"] {
    position: absolute;
    inset-inline: var(--ld-gutter);
    inset-block-start: calc(100% - var(--space-3) + var(--space-2));
    display: grid;
    gap: var(--space-1);
    max-inline-size: var(--ld-max);
    max-block-size: calc(100svh - var(--ld-header-offset) - var(--space-3));
    margin-inline: auto;
    padding: var(--space-2);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .ld-xmenu .ld-nav__link {
    padding: var(--space-3);
    transition:
      background-color var(--dur-base) var(--ease-out),
      color var(--dur-base) var(--ease-out);
  }

  /* Hover and press, as the app's `.menu__item` has them. */
  .ld-xmenu .ld-nav__link:hover {
    background: var(--surface-sunken);
  }

  .ld-xmenu .ld-nav__link:active {
    background: var(--surface-3);
  }
}

/* ⚠ A MENU TALLER THAN THE SCREEN SAYS SO. On a landscape phone (844x390) the panel is shorter
   than its content and scrolls; the script marks `data-more-end` while there is more below, and
   this cue - the table's edge shade turned on its side, with a chevron - sits on the bottom edge. */
.ld-xmenu__more {
  position: sticky;
  inset-block-end: calc(var(--space-2) * -1);
  display: grid;
  place-items: end center;
  block-size: var(--space-8);
  margin-block-start: calc(var(--space-8) * -1);
  color: var(--text-secondary);
  background: linear-gradient(to top, var(--scrim), var(--scrim) 20%, transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.ld-xmenu[data-more-end] .ld-xmenu__more {
  opacity: 1;
}

/* ⚠ THE TEXT ROLE, NOT THE SECONDARY ONE, ON THE MENU'S GLASS. The panel samples whatever the page
   has under it, and the page's primary button blurred to a bright blue patch behind one link: in
   the dark mode `--text-secondary` measured 3.03 against those pixels, `--text` 5.10 with the
   panel at level 3 (rendered pixels, 390 and 990 wide, 2026-10-29). The apex's menu never had the
   problem because it was an opaque sheet. */
.ld-xmenu :is(.ld-nav__link, .locale-menu__button) {
  color: var(--text);
}

/* The same on the current language in the menu: `--brand-strong` on this glass measured 4.07 in the
   light mode (rendered pixels, 390, 2026-10-29). It stays marked by the check and the weight. */
.ld-xmenu .locale-menu__item[aria-current="page"] {
  color: var(--text);
}
