/* Form layout: a form page as a form card and an aside (what happens next,
   facts to know before writing). One column on narrow screens, in source
   order; side by side from the tablet breakpoint, the form on the left. */

.form-layout {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

@media (min-width: 880px) {
  .form-layout {
    grid-template-columns: minmax(0, 36rem) minmax(0, 1fr);
    grid-template-areas: "main aside";
  }

  .form-layout__main {
    grid-area: main;
  }

  .form-layout__aside {
    grid-area: aside;
  }
}

.form-card {
  padding: var(--space-m);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background-color: var(--bg-surface);
}

/* Numbered steps: the number is drawn from a counter, the list keeps its
   ordered-list semantics. */
.form-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding: 0;
  list-style: none;
  counter-reset: form-step;
}

/* The number is positioned, not a grid cell: a grid would split a step's
   text and its links into separate cells. */
.form-steps li {
  position: relative;
  min-block-size: var(--space-l);
  padding-inline-start: calc(var(--space-l) + var(--space-xs));
  color: var(--text-secondary);
  counter-increment: form-step;
}

.form-steps li::before {
  content: counter(form-step);
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  display: grid;
  place-content: center;
  inline-size: var(--space-l);
  block-size: var(--space-l);
  border-radius: var(--radius-pill);
  background-color: var(--accent-soft);
  color: var(--accent-hover);
  font-family: var(--font-mono);
  font-size: var(--step--1);
}

.form-aside__card {
  padding: var(--space-m);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background-color: var(--bg-surface);
}

.form-aside__title {
  font-size: var(--step-0);
}

.form-aside__facts dt {
  font-weight: 600;
}

.form-aside__facts dd {
  color: var(--text-secondary);
}
