/* Part of the Simple stack for HAZ (load right after simple.min).
   Kit opinions / missing pieces — not a separate framework layer.
   Do NOT depend on Open Props here: OP may be absent; child may map OP → Simple/HAZ
   knobs in theme.css. This file uses Simple vars, HAZ vars, and plain lengths only.
   Site-specific chrome belongs in child CSS (theme, site_header, …).
   Framework-agnostic haz_* utilities live in css/haz/haz.css.

   Simple stance: Simple is desktop-first (max-width:720 undos). Do NOT add more
   max-width:720 patches here — override wrong defaults at every width. Later fork
   (*SimpleAndSmart*) = mobile-first absorb of this file. Child sets --haz_measure. */

/* Page measure: replace Simple’s min(45rem, 90%) column. */
body {
  grid-template-columns: 1fr var(--haz_measure, min(1024px, 95%)) 1fr;
}

/* Landmark asides (FAQ, …): same measure column as main — not Simple’s floated 30% card.
   Article-like padding/radius; border transparent (article keeps the visible stroke). */
body > aside {
  float: none;
  width: auto;
  max-width: none;
  margin-inline-start: 0;
  padding: 1rem;
  font-size: inherit;
  background-color: transparent;
  border: var(--border-width) solid transparent;
  border-radius: var(--standard-border-radius);
}

/* FAQ-style landmark under main only — don’t zero margin on other asides. */
body > main + aside {
  margin-bottom: 0;
}

body > aside summary {
  color: var(--haz_site_primary);
}

/* Simple’s body > footer: drop the 4rem top margin and hide the top hairline. */
body > footer {
  margin-top: 0;
  border-top-color: transparent;
}

/* Headings: Simple is desktop-first (big rem, then max-width:720 shrink).
   Flat HAZ ladder (+0.25rem steps) at every width — no MQ (#70 / #30). */
h1 { font-size: 2.25rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Header nav links are links — undo Simple’s bordered faux-button chrome. */
header nav a,
header nav a:visited {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  color: var(--haz_site_primary);
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1.25;
}

header nav a:hover,
header nav a:focus-visible,
header nav a.current,
header nav a[aria-current="page"],
header nav a[aria-current="true"],
header nav a.haz_is_active {
  background: none;
  border: none;
  color: var(--haz_site_primary_hover);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

header nav a.haz_is_active {
  color: var(--haz_site_primary);
}

/* Blog meta + pages list — port of pico-x #58 (kit defaults; brand stays in child).
   Simple leaves ul/dl chrome and huge h2 margins; haz.com look needs these. */
.haz_blog_meta {
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  font-size: 1rem;
}

.haz_blog_meta dl {
  margin: 0;
}

.haz_blog_meta dl > div {
  margin-bottom: 1.25rem;
}

.haz_blog_meta dl > div:last-child {
  margin-bottom: 0;
}

.haz_blog_meta dl > div > div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  column-gap: 1rem;
  align-items: baseline;
}

.haz_blog_meta dt {
  margin: 0;
  font-weight: 700;
  color: inherit;
}

.haz_blog_meta dd {
  margin: 0;
}

.haz_blog_meta dd ul {
  display: inline;
  margin: 0;
  padding: 0;
  list-style: none;
}

.haz_blog_meta dd li {
  display: inline;
  margin: 0;
  padding: 0;
  list-style: none;
}

.haz_pages_list,
.haz_pages_list > li {
  list-style: none;
}

.haz_pages_list {
  padding: 0;
  margin: 0;
  margin-bottom: var(--size-4);
}

.haz_pages_list > li > article > :first-child {
  margin-top: 0;
}

.haz_pages_list .haz_blog_meta {
  margin-bottom: 0;
}

/* Simple paints section borders/padding; blog index shell should stay quiet. */
main .haz_section--blog {
  border: none;
  margin: 0;
  padding: 0;
}

/* Simple boxes pre with aside/details and paints inline code pink (--code).
   Fences use --haz_pre_bg so they stand out on the page and inside a callout.
   Child theme sets that token (off-black in dark, a grey step in light).
   Inline code is a chip. kbd keeps Simple's keycap.
   --code stays so callout type=code can still use it as an accent. */
pre {
  background-color: var(--haz_pre_bg, #212529);
  border: none;
  color: var(--text);
}

code {
  color: var(--text);
  background-color: var(--accent-bg);
  padding: 0.1rem 0.3rem;
  border-radius: var(--standard-border-radius);
}

pre code,
pre span {
  color: inherit;
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}
