/* Author styles must not override the semantic hidden state. */
body [hidden] { display: none !important; }
@media (max-width: 640px) {
  html[data-d91-js="false"] .site-header { height: auto; position: static; }
  html[data-d91-js="false"] .site-header .wrap { height: auto; flex-wrap: wrap; gap: 12px; padding-block: 12px; }
  html[data-d91-js="false"] .site-header .site-nav {
    display: flex; flex-wrap: wrap; width: 100%; max-width: 100%;
    height: auto; min-height: 0; max-height: none;
    gap: 10px 14px; overflow: visible; white-space: normal;
  }
  html[data-d91-js="false"] .site-header .site-nav a { flex-shrink: 0; }
}
/* Shared Day91 header and homepage footer, using the site's existing tokens. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(250, 249, 244, .97);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  flex-wrap: nowrap;
}
.site-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
}
.site-header .logo img { width: 28px; height: 28px; border-radius: 5px; }
.site-header .home-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font: 600 13px/28px var(--font-sans);
  text-align: center;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
}
.site-nav > a,
.site-nav .nav-trigger {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: 500 .875rem var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.site-nav > a:hover,
.site-nav .nav-trigger:hover,
.site-nav > a[aria-current=page],
.site-nav .nav-trigger[aria-current=page] { color: var(--ink); }
.site-nav > a::after,
.site-nav .nav-trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.site-nav > a[aria-current=page]::after,
.site-nav .nav-trigger[aria-current=page]::after { transform: scaleX(1); }
.site-nav .nav-subscribe {
  display: inline-flex;
  align-items: center;
  height: auto;
  margin-left: 10px;
  padding: 8px 18px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.site-nav .nav-subscribe:hover { background: var(--brand); color: var(--surface); }
.home-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 64px 0 32px;
  background: var(--hero-bg);
  color: #aebdb3;
  font-size: 14px;
}
.home-footer::before {
  content: "";
  position: absolute;
  right: clamp(16px, 5vw, 80px);
  bottom: -34px;
  width: clamp(150px, 23vw, 280px);
  aspect-ratio: 1;
  background: url('/assets/day91-mark.svg') center / contain no-repeat;
  opacity: .12;
  pointer-events: none;
}
.home-footer > .wrap { position: relative; z-index: 1; }
.home-footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.home-footer-brand > a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #eef3ee;
  font: 500 23px 'Newsreader', Georgia, serif;
  text-decoration: none;
}
.home-footer .home-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font: 600 13px/28px var(--font-sans);
  text-align: center;
}
.home-footer-brand p { max-width: 22em; margin: 14px 0 0; }
.home-footer h3 {
  margin: 0 0 14px;
  color: #aebdb3;
  font: 500 11px var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.home-footer-grid > div:not(:first-child) > a {
  display: block;
  margin-bottom: 10px;
  color: #eef3ee;
  opacity: .88;
  text-decoration: none;
}
.home-footer-grid > div:not(:first-child) > a:hover { opacity: 1; text-decoration: underline; }
.home-footer-legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 48px 0 0;
  padding-top: 20px;
  border-top: 1px solid #2a4436;
  font: 400 11.5px var(--font-mono);
}
@media (max-width: 900px) {
  .home-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .site-header { height: auto; min-height: var(--nav-h); }
  .site-header .wrap { min-height: var(--nav-h); height: auto; flex-wrap: wrap; padding-top: 8px; }
  .site-header .site-nav { display: flex; width: 100%; max-width: 100%; height: 42px; overflow-x: auto; }
  .site-header .site-nav > a { height: 42px; padding: 0 12px; }
  .home-footer { padding-top: 48px; }
}
