:root {
  --brand-teal: #12e0c6;
  --brand-blue: #3e9bfd;
  --brand-violet: #8b5cf6;
  --brand-pink: #f924c2;
  --brand-gradient: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-blue) 33%, var(--brand-violet) 66%, var(--brand-pink) 100%);
  --brand-ink: #0a1930;
  --brand-ink-muted: #3d5677;
  --brand-amber: #fdb13a;
  --brand-bg: #f7faff;
  --brand-surface: #ffffff;
  --brand-border: rgba(10, 25, 48, 0.1);
}

/* base.css defines this same reset, but history.html/progress.html/settings.html/
   pricing.html load brand.css standalone without it — without this, any
   brand.css component that pairs width:100% with its own padding/border (e.g.
   .account-sidebar on mobile) sizes larger than its container and creates a
   few pixels of unwanted page-wide horizontal scroll. */
* { box-sizing: border-box; }

.brand-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(760px 480px at 10% 0%, rgba(18, 224, 198, 0.16), transparent 60%),
    radial-gradient(700px 460px at 90% 8%, rgba(249, 36, 194, 0.13), transparent 60%),
    radial-gradient(640px 440px at 50% 30%, rgba(139, 92, 246, 0.1), transparent 65%),
    var(--brand-bg);
  color: var(--brand-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Visually hidden until focused (Tab from page load) — lets a keyboard user
   jump past the nav (and, on account pages, the sidebar) straight to the
   page's actual content instead of tabbing through every nav link first. */
.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--brand-ink);
  color: #fff;
  font: 700 13px/1 "Inter", sans-serif;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }

.brand-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--brand-ink);
}
.brand-logo img { height: 100px; width: auto; display: block; }
@media (max-width: 760px) {
  .brand-logo img { height: 50px; }
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--brand-border);
  background: var(--brand-surface);
  color: var(--brand-ink);
  font: 700 14px/1 "Inter", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.brand-btn:hover { transform: translateY(-1px); }

/* Signed-in "Welcome, {name}" chip + dropdown — shown in place of the
   Sign in button on marketing pages (index.html) once home-auth.js confirms
   a session. Mirrors app.html's .user-menu (base.css) but themed with the
   --brand-* tokens this stylesheet's pages already use. */
.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px 0 20px;
  border-radius: 999px; border: 1px solid var(--brand-border); background: var(--brand-surface);
  color: var(--brand-ink); font: 700 14px/1 "Inter", sans-serif; cursor: pointer; white-space: nowrap;
  max-width: 220px; transition: transform 0.15s ease;
}
.user-menu-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-btn:hover { transform: translateY(-1px); }
.user-menu-chevron { width: 14px; height: 14px; flex: none; transition: transform 0.15s ease; }
.user-menu.open .user-menu-chevron { transform: rotate(180deg); }
.user-menu-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px;
  background: var(--brand-surface); border-radius: 12px; padding: 6px;
  border: 1px solid var(--brand-border);
  box-shadow: 0 10px 34px rgba(10, 25, 48, 0.16); z-index: 60;
}
.user-menu-item {
  display: block; width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: none; background: none; border-radius: 8px; text-align: left;
  font: 600 14px/1.3 "Inter", sans-serif; color: var(--brand-ink); text-decoration: none; cursor: pointer;
}
.user-menu-item:hover { background: var(--brand-bg); }

/* .brand-btn/.mobile-menu-actions both declare an explicit `display`, which
   beats the browser's own [hidden]{display:none} UA-stylesheet rule (equal
   specificity, author style wins) — same footgun home.css/controls.css
   already work around elsewhere in this app. Without these, toggling the
   `hidden` property from home-auth.js on these signed-in-state elements
   would silently do nothing visually. */
#navSignInBtn[hidden], #mobileMenuActions[hidden], #mobileMenuUser[hidden] { display: none; }

/* Mobile menu's signed-in block — a stacked equivalent since a dropdown
   doesn't fit the full-screen slide-in mobile nav (see .mobile-menu below,
   defined per-page in index.html's own <style>). */
.mobile-menu-user-greeting {
  font: 800 15px/1 "Inter", sans-serif; color: var(--brand-ink);
  padding: 10px 4px; margin-bottom: 4px;
}

.brand-btn-primary {
  border: none;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 14px 28px rgba(139, 92, 246, 0.28);
}

/* Account area — the left sidebar shared by settings.html/progress.html/
   history.html, wrapping each page's existing centered content column. */
.account-layout {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.account-sidebar {
  flex: 0 0 200px;
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 10px;
  margin-top: 40px;
  border-radius: 16px;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
}
.account-sidebar-link {
  display: block;
  padding: 11px 14px;
  border-radius: 10px;
  font: 700 14px/1 "Inter", sans-serif;
  color: var(--brand-ink-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.account-sidebar-link:hover { background: var(--brand-bg); color: var(--brand-ink); }
.account-sidebar-link.active { background: var(--brand-gradient); color: #fff; }
.account-layout > .account-sidebar + * { flex: 1; min-width: 0; }
@media (max-width: 860px) {
  .account-layout { flex-direction: column; padding: 0 16px; }
  /* flex-basis: 200px (above) sized the desktop column's width; flip it back
     to auto here or, once .account-layout's main axis turns vertical, that
     same basis stretches the sidebar to 200px tall instead (and every link
     row-stretches to match) — this is the fix for that. */
  .account-sidebar { flex: 0 0 auto; position: static; flex-direction: row; align-items: center; width: 100%; margin-top: 24px; overflow-x: auto; }
  .account-sidebar-link { white-space: nowrap; }
}

/* Shared site footer — markup injected by scripts/site-footer.js */
.brand-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--brand-border);
  font: 500 13px/1 "Inter", sans-serif;
  color: var(--brand-ink-muted);
}
.brand-footer a { color: inherit; text-decoration: none; margin-right: 18px; }
.brand-footer a:hover { color: var(--brand-ink); }
