@import url("assets/design-tokens.css");
@import url("assets/components.css");

* { box-sizing: border-box; border-radius: var(--radius); }

html, body { min-height: 100%; }

body { min-height: 100dvh; }

.page {
  width: min(100% - 56px, 1120px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 48px 0 var(--space-6);
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: var(--border-width) solid var(--border);
}

.eyebrow, .footer { margin: 0; }

h1 { margin: var(--space-1) 0 var(--space-2); }

.intro { max-width: 660px; margin: 0; color: var(--muted); }

.theme-toggle {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  font-size: 17px;
}

.directory { margin-top: var(--space-6); }

.directory-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.directory-head h2 {
  font-size: var(--label-size);
  font-weight: var(--h2-weight);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.card {
  display: flex;
  min-height: 228px;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-5);
  border: var(--border-width) solid var(--border);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: color 120ms linear, background-color 120ms linear, border-color 120ms linear;
}

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

.card:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.card-top { display: flex; justify-content: space-between; gap: var(--space-4); }

.index { color: var(--muted); font-size: var(--label-size); letter-spacing: var(--label-tracking); }

.arrow { font-size: 22px; line-height: 1; }

.card h3 {
  margin: 40px 0 var(--space-2);
  font-size: var(--h2-size);
  font-weight: var(--h2-weight);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.card p { max-width: 40ch; margin: 0; color: var(--muted); }

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: var(--border-width) solid var(--border);
  color: var(--muted);
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}

.status { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--border-width) solid var(--border);
}

.footer a { color: inherit; text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 719px) {
  .page { width: min(100% - 32px, 1120px); padding-top: var(--space-6); }
  .masthead { gap: var(--space-3); }
  .grid { grid-template-columns: 1fr; }
  .card { min-height: 200px; }
}

@media (max-width: 410px) { .footer { flex-direction: column; } }
