/* Structure only. Every value comes from tokens.css. Mobile first: one
   column that wraps, so no breakpoints are needed yet. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }

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

body {
  margin: 0 auto;
  max-width: var(--measure);
  padding: var(--space-3);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-body);
  overflow-wrap: break-word;
}

a { color: var(--color-link); }
a:hover { color: var(--color-link-hover); }
:focus-visible { outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-width); }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-heading);
  margin: var(--space-5) 0 var(--space-3);
}
h1 { font-size: var(--text-2xl); margin-top: 0; }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
p, ul, ol, blockquote, pre { margin: 0 0 var(--space-3); }

.skip-link { position: absolute; left: -999rem; }
.skip-link:focus { position: static; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
  border-bottom: var(--border-width) solid var(--color-border);
}
.site-name { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: var(--weight-bold); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); list-style: none; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: var(--space-2) 0; }
.site-nav a[aria-current="page"] { font-weight: var(--weight-bold); }

/* Icon menu item (search): the icon takes the link colour; the box is a full tap target. */
.site-nav a.site-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0;
  border-bottom: var(--focus-width) solid transparent;
}
.site-nav a.site-nav__icon[aria-current="page"] { border-bottom-color: currentColor; }
.icon { display: block; width: var(--icon-size); height: var(--icon-size); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-footer {
  margin-top: var(--space-6);
  padding-top: var(--space-3);
  border-top: var(--border-width) solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.entry__section, .entry__date, .entry-list__date { color: var(--color-text-muted); font-size: var(--text-sm); }
.entry__section { margin-bottom: var(--space-2); }
.entry__header { margin-bottom: var(--space-4); }
.entry__header h1 { margin-bottom: var(--space-2); }

.entry-list { list-style: none; padding: 0; }
.entry-list__item { padding: var(--space-3) 0; border-top: var(--border-width) solid var(--color-border); }
.entry-list__title { display: block; font-size: var(--text-lg); font-weight: var(--weight-bold); }
.entry-list__date { display: block; }
.entry-list__summary { margin: var(--space-2) 0 0; }

.attachments { margin-top: var(--space-5); }
.file-list { list-style: none; padding: 0; }
.file-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-3) 0;
  border-top: var(--border-width) solid var(--color-border);
}
.file-list__size { color: var(--color-text-muted); font-size: var(--text-sm); white-space: nowrap; }

.prose img, .prose pre { max-width: 100%; }
.prose pre { overflow-x: auto; padding: var(--space-3); background: var(--color-surface); border-radius: var(--radius); }
.prose code { font-family: var(--font-mono); font-size: var(--text-sm); }
.prose blockquote { padding-left: var(--space-3); border-left: var(--border-width) solid var(--color-border); color: var(--color-text-muted); }

.search__form label { display: block; margin-bottom: var(--space-2); }
.search__form input {
  width: 100%;
  padding: var(--space-2);
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
}
.search__status { margin-top: var(--space-3); color: var(--color-text-muted); }
