/* ============================================================
   LAYOUT & NAVIGATION — one column, a sticky white header,
   a tab bar on phones.
============================================================ */
body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
body.has-bar{padding-bottom:calc(76px + 80px + env(safe-area-inset-bottom))}
.page{max-width:var(--measure);margin:0 auto;padding:var(--s4) var(--gutter) var(--s8)}
.wide{max-width:960px}

/* header */
.top{position:sticky;top:0;z-index:8;display:flex;justify-content:space-between;align-items:center;gap:var(--s4);
     max-width:var(--measure);margin:0 auto;padding:12px var(--gutter);min-height:60px}
.top::before{content:"";position:absolute;inset:0 -100vw;background:var(--chrome);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);z-index:-1}
.top.wide{max-width:960px}
.brand{display:inline-flex;align-items:center;gap:9px;text-decoration:none;font-family:var(--font-serif);font-weight:600;font-size:1.125rem;letter-spacing:.02em;color:var(--ink);white-space:nowrap}
.brand::before{content:"";width:10px;height:10px;border-radius:50%;background:var(--accent);flex:none}
.brand-domain{color:var(--ink-3);font-weight:500}
.brand:hover .brand-domain{color:var(--accent-deep)}

.top-nav{display:flex;gap:4px;align-items:center;font-size:.9rem;white-space:nowrap;flex:none}
.top-nav a,.top-nav button{color:var(--ink-2);text-decoration:none;background:none;border:0;font:inherit;font-weight:500;cursor:pointer;
  padding:0 12px;min-height:36px;display:inline-flex;align-items:center;border-radius:var(--r-pill);transition:background var(--t-fast),color var(--t-fast)}
.top-nav a:hover,.top-nav button:hover{color:var(--ink);background:var(--surface-2)}
.top-nav a[aria-current]{color:var(--ink);background:var(--surface-2)}
.top-nav .primary-nav{display:none;gap:2px;margin-right:6px;padding:3px;background:var(--surface-2);border-radius:var(--r-pill)}
.top-nav .primary-nav a{min-height:32px}
.top-nav .primary-nav a:hover{background:transparent;color:var(--ink)}
.top-nav .primary-nav a[aria-current]{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(21,30,28,.08)}
.top-nav #logout{display:none}
/* V26: long display names must not squeeze the brand on narrow phones */
.top-nav .me-name{max-width:110px;overflow:hidden;text-overflow:ellipsis}

/* phone tab bar */
.bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:7;display:flex;justify-content:space-around;align-items:center;
  background:var(--chrome);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-top:1px solid var(--line);
  padding:6px 8px calc(6px + env(safe-area-inset-bottom))}
.bottom-nav a{text-decoration:none;color:var(--ink-2);font-size:.8125rem;font-weight:500;padding:8px 14px;min-height:44px;display:inline-flex;align-items:center;border-radius:var(--r-pill);transition:color var(--t-fast),background var(--t-fast)}
.bottom-nav a[aria-current]{color:var(--accent-deep);background:var(--accent-tint)}
.bottom-nav .new{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;padding:0;background:var(--accent-fill);color:#fff}
.bottom-nav .new .dot{width:16px;height:2px;background:#fff;border-radius:2px;position:relative}
.bottom-nav .new .dot::after{content:"";position:absolute;inset:0;background:#fff;border-radius:2px;transform:rotate(90deg)}
.bottom-nav .new:active{transform:scale(.96)}

.rule{border:0;border-top:1px solid var(--line);margin:var(--s6) 0}
.section-head{display:flex;align-items:baseline;gap:10px;margin:var(--s7) 0 var(--s4);flex-wrap:wrap}
.section-head h2{font-size:1.125rem}
.section-head .sub{font-size:.8125rem;color:var(--ink-3)}

/* V11.3 — "add to home screen" hint: one quiet line above the tab bar, on phones only */
.install-hint{position:fixed;left:12px;right:12px;bottom:calc(72px + env(safe-area-inset-bottom));z-index:7;display:flex;gap:8px 12px;align-items:center;flex-wrap:wrap;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-input);padding:12px 14px;font-size:.875rem;color:var(--ink);box-shadow:var(--shadow-float)}
.install-hint .ih-never{min-height:36px;font-size:.875rem}
.install-hint .ih-text{flex:1 1 200px}
.install-hint .ih-go{min-height:36px;padding:6px 14px;font-size:.875rem}
.install-hint .ih-ios{flex-basis:100%;margin:0}
.install-hint .ih-close{margin-left:auto;min-height:36px;padding:6px 14px;border:0;background:var(--surface-2);color:var(--ink);font:inherit;font-size:.875rem;font-weight:500;cursor:pointer;border-radius:var(--r-pill)}
.install-hint .ih-close:hover{background:var(--surface-3)}
@media (min-width:720px){.install-hint{display:none}}

.install-steps{list-style:none;margin:var(--s3) 0 0;padding:0;display:flex;flex-direction:column;gap:12px;counter-reset:is}
.install-steps li{display:flex;gap:12px;align-items:flex-start;line-height:1.55;counter-increment:is}
.install-steps li::before{content:counter(is);flex:none;width:24px;height:24px;border-radius:50%;background:var(--ink);color:var(--bg);font-size:.75rem;font-weight:600;display:flex;align-items:center;justify-content:center;margin-top:2px}
.install-steps .glyph{flex:none;width:32px;height:32px;border-radius:8px;background:var(--accent-tint);color:var(--accent-ink);display:flex;align-items:center;justify-content:center}
.install-sheet .ios-chrome{margin-top:var(--s4)}
