/* The site-wide frame on every page: a pinned sidebar (the only menu) and a pinned
   "free, supporter-funded" strip across the top of the content. Markup comes from
   scripts/build_tools.py (shell_top / shell_bottom). Colour tokens: landing.css. */
html { scroll-padding-top: 64px; }
body.sh-body { background: radial-gradient(1100px 520px at 62% -140px, rgba(233, 168, 58, 0.08), transparent 70%), var(--bg); min-height: 100vh; }
.sh { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */
.sh-side {
  position: sticky; top: 0; height: 100vh; width: 248px; flex-shrink: 0; z-index: 30;
  display: flex; flex-direction: column; gap: 18px; padding: 20px 14px 16px;
  background: rgba(10, 11, 15, 0.94); border-right: 1px solid var(--border-soft);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: #262b39 transparent;
}
.sh-logo { display: inline-flex; align-items: center; gap: 11px; padding: 2px 10px 4px; text-decoration: none; color: var(--text); }
.sh-logo img { height: 30px; width: auto; filter: drop-shadow(0 0 10px rgba(233, 168, 58, 0.35)); }
.sh-logo .brand { font-size: 16px; }
.sh-nav { display: flex; flex-direction: column; gap: 2px; }
.sh-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px;
  color: var(--text-dim); text-decoration: none; font-weight: 600; font-size: 14.5px; line-height: 1.3;
  border: 1px solid transparent; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sh-link svg { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sh-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.sh-link.on { color: var(--accent-hi); background: rgba(233, 168, 58, 0.10); border-color: rgba(233, 168, 58, 0.35); }
.sh-group { margin: 14px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); }
.sh-sep { height: 1px; margin: 10px 8px; background: var(--border-soft); }

.sh-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.sh-support {
  padding: 13px 13px 12px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(233, 168, 58, 0.15), rgba(233, 168, 58, 0.03) 60%), var(--card);
  border: 1px solid rgba(233, 168, 58, 0.26);
}
.sh-support p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.45; color: var(--text-dim); }
.sh-support p b { color: var(--text); }
.sh-support-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px; border-radius: 10px;
  font-weight: 700; font-size: 13px; text-decoration: none; color: #0b0b0d; background: linear-gradient(90deg, var(--accent-lo), var(--accent));
}
.sh-support-btn:hover { filter: brightness(1.08); }
.sh-account { display: flex; align-items: center; gap: 6px; }
.sh-signin {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 11px;
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; text-align: left;
}
.sh-signin:hover { border-color: rgba(233, 168, 58, 0.5); color: var(--text); }
.sh-signin .acct-avatar { width: 24px; height: 24px; flex-shrink: 0; }
.sh-signin #landing-signin-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-optional { margin-left: auto; font-size: 11px; color: var(--text-faint); font-weight: 600; }
.sh-account .acct-signout { margin-left: 0; flex-shrink: 0; }
.sh-links { display: flex; flex-wrap: wrap; gap: 3px 13px; padding: 0 6px; font-size: 12.5px; }
.sh-links a { color: var(--text-faint); text-decoration: none; }
.sh-links a:hover, .sh-links a.on { color: var(--text); }
.sh-links a:first-child { flex-basis: 100%; color: var(--text-dim); font-weight: 600; }
.sh-links a:first-child.on { color: var(--accent-hi); }

/* ---------- content column ---------- */
.sh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sh-mbar { display: none; }
.sh-strip {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  min-height: 42px; padding: 7px 20px; font-size: 13.5px; color: var(--text-dim);
  background: linear-gradient(90deg, rgba(20, 17, 12, 0.96), rgba(38, 29, 14, 0.97), rgba(20, 17, 12, 0.96));
  border-bottom: 1px solid rgba(233, 168, 58, 0.22); backdrop-filter: blur(8px);
}
.sh-strip b { color: var(--text); }
.sh-strip-heart { color: var(--accent-hi); }
.sh-strip-short { display: none; }
.sh-strip-btn {
  padding: 3px 13px; border-radius: 999px; font-weight: 700; font-size: 12.5px; text-decoration: none;
  color: var(--accent-hi); border: 1px solid rgba(233, 168, 58, 0.55); white-space: nowrap;
}
.sh-strip-btn:hover { background: rgba(233, 168, 58, 0.14); }
.sh-page { flex: 1; min-width: 0; }
/* the old two-row top bar used to reserve this */
.sh-page .tool-page, .sh-page .legal { scroll-margin-top: 50px; }

/* ---------- tablets / phones: the sidebar becomes a drop-down menu ---------- */
@media (max-width: 900px) {
  html { scroll-padding-top: 100px; }
  .sh { display: block; }
  .sh-mbar {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 32;
    height: 56px; padding: 0 12px 0 16px; background: rgba(10, 11, 15, 0.97); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
  }
  .sh-mbar .sh-logo { padding: 0; }
  .sh-mbar .sh-logo img { height: 26px; }
  .sh-menu { position: relative; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .sh-menu svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  body.menu-open .sh-menu { border-color: rgba(233, 168, 58, 0.6); color: var(--accent-hi); }
  .sh-side {
    position: fixed; top: 56px; left: 0; right: 0; height: auto; max-height: calc(100dvh - 56px); width: auto; z-index: 31;
    border-right: none; border-bottom: 1px solid rgba(233, 168, 58, 0.3); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
    padding-top: 12px; background: var(--bg); overscroll-behavior: contain;
  }
  .sh-side > .sh-logo { display: none; }
  body.menu-open .sh-side { transform: none; opacity: 1; visibility: visible; transition: opacity .18s ease, transform .18s ease; }
  body.menu-open { overflow: hidden; }
  .sh-scrim { position: fixed; inset: 56px 0 0 0; z-index: 30; background: rgba(0, 0, 0, 0.55); }
  .sh-scrim[hidden] { display: none; }
  .sh-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .sh-nav .sh-link { background: var(--card); border-color: var(--border-soft); }
  .sh-nav .sh-link.on { background: rgba(233, 168, 58, 0.10); border-color: rgba(233, 168, 58, 0.35); }
  .sh-group { grid-column: 1 / -1; margin: 8px 4px 0; }
  .sh-sep { display: none; }
  .sh-strip { top: 56px; min-height: 38px; font-size: 12.5px; padding: 6px 14px; }
  .sh-strip-long { display: none; }
  .sh-strip-short { display: inline; }
}
@media (max-width: 480px) {
  .sh-nav { grid-template-columns: 1fr; }
}
