/*
 * Reset, document-level typography, the page shell, the top bar,
 * and the closed set of five utilities.
 */

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
}

/* ---------- Document ---------- */

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: var(--t-14);
  font-weight: var(--fw-normal);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--c-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  border-radius: var(--r-sm);
  outline: 2px solid var(--c-link);
  outline-offset: 1px;
}

hr {
  height: 0;
  margin: var(--s-5) 0;
  border: 0;
  border-top: 1px solid var(--c-border);
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}

.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  max-width: var(--w-content);
  min-height: var(--h-topbar);
  margin-inline: auto;
  padding: 0 var(--s-5);
}

.topbar__brand {
  display: inline-flex;
  gap: var(--s-2);
  align-items: center;
  color: var(--c-text);
  font-size: var(--t-14);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
}

.topbar__brand:hover {
  text-decoration: none;
}

.topbar__mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--c-text);
  border-radius: var(--r-sm);
  color: var(--c-text-invert);
  font-size: var(--t-12);
  font-weight: var(--fw-semibold);
}

.topbar__nav {
  display: flex;
  gap: var(--s-1);
  align-items: center;
  margin-left: auto;
}

.topbar__link {
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm);
  color: var(--c-text-2);
  font-size: var(--t-13);
}

.topbar__link:hover {
  background: var(--c-surface-hover);
  color: var(--c-text);
  text-decoration: none;
}

/* ---------- Shell ---------- */

.shell {
  max-width: var(--w-content);
  margin-inline: auto;
  padding: var(--s-6) var(--s-5) var(--s-16);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: flex-start;
  margin-bottom: var(--s-5);
}

.page-head__text {
  min-width: 0;
}

.page-head__title {
  font-size: var(--t-24);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

.page-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
  margin-top: var(--s-2);
  color: var(--c-text-muted);
  font-size: var(--t-13);
}

.page-head__actions {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  margin-left: auto;
}

/* ---------- Utilities (closed set of five) ---------- */

.u-muted {
  color: var(--c-text-muted);
}

.u-mono {
  font-family: var(--f-mono);
  font-size: var(--t-12);
}

.u-nums {
  font-variant-numeric: tabular-nums;
}

.u-right {
  text-align: right;
}

.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}
