/* Page frame: reset, type, header, navigation, layout helpers. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; min-height: 100dvh; overflow-x: hidden;
}
h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brass-soft); }

.ser { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; }
h1, .h1 { font: 500 var(--t-h1)/1.08 var(--serif); letter-spacing: -.02em; }
h2, .h2 { font: 500 var(--t-h2)/1.2 var(--serif); letter-spacing: -.015em; }
h3, .h3 { font: 600 var(--t-h3)/1.3 var(--serif); letter-spacing: -.01em; }
h1 em, h2 em { font-style: italic; color: var(--brass); }
.eyebrow { font: 700 var(--t-micro)/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass-ink); }
.muted { color: var(--muted); }
.small { font-size: var(--t-small); }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 14px;
  border-radius: var(--r-sm); z-index: 60; }
.skip:focus { left: 8px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: var(--s4);
  padding: 0 max(var(--s4), env(safe-area-inset-left)); background: rgba(246, 241, 231, .92);
  backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font: 600 1.125rem/1 var(--serif); letter-spacing: -.01em; min-height: var(--tap); }
.logo img { width: 30px; height: 30px; border-radius: 50%; }
.nav { display: none; gap: var(--s5); margin-left: var(--s6); font-weight: 500; font-size: .9375rem; color: var(--muted); }
.nav a { display: flex; align-items: center; min-height: var(--tap); border-bottom: 2px solid transparent; transition: color .15s; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--brass); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: var(--s3); }
.avatar {
  width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: .875rem; border: 4px solid var(--bg);
}

/* phone bottom bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: rgba(255, 253, 248, .96);
  backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a, .tabbar button {
  flex: 1; min-width: 0; height: var(--bar-h); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: .6875rem; font-weight: 600; color: var(--muted); letter-spacing: .01em;
}
.tabbar .on { color: var(--ink); }
.tabbar .on .i { stroke: var(--brass-ink); }
.tabbar .dot { position: relative; }
.tabbar .dot b {
  position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brass-ink); color: #fff; font-size: .6875rem; line-height: 18px; text-align: center;
}

/* page */
main { display: block; width: 100%; max-width: var(--page); margin: 0 auto;
  padding: var(--s5) var(--s4) calc(var(--bar-h) + var(--s7)); outline: none; }
main.wide { max-width: 1440px; }
.banner {
  display: flex; align-items: center; justify-content: center; gap: var(--s3); flex-wrap: wrap; padding: 8px var(--s4);
  background: var(--brass-soft); border-bottom: 1px solid var(--line-strong); font-size: var(--t-small); font-weight: 500;
    text-align: center;
}
.stack > * + * { margin-top: var(--s4); }
.row { display: flex; align-items: center; gap: var(--s3); }
.row.wrap { flex-wrap: wrap; }
.row .push { margin-left: auto; }
.pagehead { display: flex; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.pagehead p { margin-top: 6px; color: var(--muted); }
.pagehead .push { margin-left: auto; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); color: var(--muted); font-weight: 500;
  font-size: var(--t-small); }
.back:hover { color: var(--ink); }
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

@media (min-width: 900px) {
  .top { padding: 0 var(--s6); }
  .nav { display: flex; }
  .tabbar { display: none; }
  main { padding: var(--s6) var(--s6) var(--s7); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
