/* The site's chrome, shared by every public page and the app (`/app`):
 * the header (`page_shell.site_header`), the account slot and its menu, the
 * account panel, the toast, and the two "yours" surfaces a public page
 * carries - Watch / I own this on a card page and the homepage's "make it
 * yours" band (`static/js/site.js` drives all of them).
 *
 * Its own file because `pages.css` styles bare elements (body, a, table)
 * for the server-rendered pages and the app has its own (`app.css`); this
 * file only styles its own `.pv-` classes, so both can load it. Tokens from
 * `theme.css`: gilt and parchment are chrome, never data.
 */

/* Read by a screen reader, not shown (form labels the placeholder stands for). */
.pv-visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ------------------------------------------------------------ header ---- */
/* The header ends in a hairline, not a gilt rule: the sharper line took the
   calm out of every page (owner, 2026-09-26). */
.pv-site {
  position: relative; z-index: 20;
  background: linear-gradient(180deg, #13100e, var(--bg-app));
  border-bottom: 1px solid rgba(246, 242, 236, .06);
  font-family: var(--sans);
}
.pv-site-in {
  max-width: 1120px; margin: 0 auto; padding: 10px 16px; min-height: 62px;
  display: flex; align-items: center; gap: 18px;
}
.pv-brand {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  font-family: var(--display); font-weight: 700; font-size: 13.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--parchment); white-space: nowrap; text-decoration: none;
}
.pv-brand:hover { color: #fff; text-decoration: none; }
/* The mark (logo.svg): a card held at an angle. Under the pointer it
   straightens a little and its foil catches the light - the one flourish the
   header allows itself. */
.pv-mark {
  width: 28px; height: 28px; flex: none;
  filter: drop-shadow(0 3px 8px rgba(157, 184, 240, .22));
  transition: transform 260ms var(--ease), filter 260ms var(--ease);
}
.pv-brand:hover .pv-mark {
  transform: rotate(6deg) translateY(-1px);
  filter: drop-shadow(0 4px 12px rgba(201, 165, 232, .45));
}
.pv-search { flex: 1; display: flex; min-width: 0; max-width: 320px; }
.pv-search input {
  flex: 1; min-width: 0; padding: 8px 14px; font: inherit; font-size: 13px; color: var(--fg);
  background: var(--bg-sunken); border: 1px solid var(--border); border-right: 0;
  border-radius: 999px 0 0 999px;
}
.pv-search input::placeholder { color: var(--fg-faint); }
.pv-search input:focus { outline: none; border-color: var(--gilt-soft); }
.pv-search button {
  padding: 8px 14px; font: inherit; font-size: 13px; color: var(--fg-dim); cursor: pointer;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 0 999px 999px 0;
}
.pv-search button:hover { color: var(--fg); background: var(--bg-hover); }
.pv-site-nav {
  display: flex; align-items: center; gap: 2px; margin-left: auto; white-space: nowrap;
}
.pv-site-nav a {
  position: relative; padding: 8px 10px; border-radius: 8px; text-decoration: none;
  font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--fg-dim);
}
.pv-site-nav a:hover { color: var(--parchment); text-decoration: none; }
.pv-site-nav a[aria-current="page"] { color: var(--parchment); }
.pv-site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gilt), transparent);
}

/* ----------------------------------------------------- the account slot -- */
.pv-account {
  position: relative; display: flex; align-items: center; justify-content: flex-end;
  gap: 6px; min-width: 164px; flex: none;
}
.pv-join, .pv-signin {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border-radius: 999px; font-family: var(--display); font-size: 13px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.pv-join {
  color: var(--parchment); border: 1px solid var(--gilt-soft);
  background: linear-gradient(180deg, rgba(200, 170, 110, .16), rgba(200, 170, 110, .06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.pv-join:hover { border-color: var(--gilt); color: #fff; text-decoration: none; }
.pv-signin { color: var(--fg-dim); padding: 0 10px; }
.pv-signin:hover { color: var(--parchment); text-decoration: none; }
.pv-avatar-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 3px 14px 3px 3px;
  font: inherit; font-size: 13px; color: var(--fg); cursor: pointer;
  background: var(--bg-panel); border: 1px solid var(--gilt-line); border-radius: 999px;
}
.pv-avatar-btn:hover, .pv-avatar-btn[aria-expanded="true"] { border-color: var(--gilt-soft); }
.pv-avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--display); font-size: 12px; font-weight: 700; color: #1b1510;
  background: radial-gradient(circle at 35% 30%, #f3dfae, var(--gilt) 55%, #8d7240);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 4px 12px -4px rgba(200, 170, 110, .5);
}
.pv-avatar-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 236px;
  padding: 6px; background: var(--panel-grad), var(--bg-floating);
  border: 1px solid var(--gilt-soft); border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .75);
}
.pv-menu[hidden] { display: none; }
.pv-menu-who { display: grid; gap: 1px; padding: 8px 12px 10px; }
.pv-menu-who b { font-family: var(--display); color: var(--parchment); font-size: 14px; }
.pv-menu-who span { font-size: 12px; color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; }
.pv-menu a, .pv-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px;
  font: inherit; font-size: 13.5px; color: var(--fg-dim); background: none; border: 0;
  cursor: pointer; text-decoration: none;
}
.pv-menu a:hover, .pv-menu button:hover { background: var(--bg-hover); color: var(--fg); text-decoration: none; }
.pv-menu .pv-menu-admin { color: var(--gilt); }
.pv-menu hr { border: 0; border-top: 1px solid var(--gilt-line); margin: 6px 4px; }

/* ------------------------------------------------------ the account panel -- */
.pv-dialog {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  padding: 30px 28px 24px; color: var(--fg); font-family: var(--sans); font-size: 14px;
  background: var(--panel-grad), var(--bg-panel); border: 1px solid var(--gilt-soft);
  border-radius: 18px; box-shadow: 0 40px 120px -20px #000, inset 0 1px 0 rgba(255, 255, 255, .05);
}
.pv-dialog::backdrop { background: rgba(8, 6, 5, .74); backdrop-filter: blur(3px); }
.pv-dialog[open] { animation: pv-dialog-in 220ms var(--ease); }
@keyframes pv-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.pv-dialog-x {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; line-height: 1; color: var(--fg-muted); background: none; border: 0; cursor: pointer;
}
.pv-dialog-x:hover { color: var(--fg); background: var(--bg-hover); }
.pv-dform { display: block; }
.pv-dkicker {
  margin: 0; font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gilt);
}
.pv-dialog h2 {
  margin: 6px 0 8px; font-family: var(--display); font-size: 24px; font-weight: 700;
  line-height: 1.2; color: var(--parchment); letter-spacing: -.01em;
}
.pv-dialog h3 {
  margin: 20px 0 4px; font-family: var(--display); font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted);
}
.pv-dlead { margin: 0 0 14px; color: var(--fg-dim); line-height: 1.5; }
.pv-dcard { display: flex; align-items: center; gap: 14px; margin: 16px 0 12px; }
.pv-dcard img { flex: 0 0 56px; border-radius: 4px; object-fit: contain; }
.pv-dcard strong { display: block; color: var(--parchment); line-height: 1.35; }
.pv-dcard span { display: block; margin-top: 4px; font-size: 12px; color: var(--fg-muted); }
.pv-dbenefits { margin: 12px 0 0; color: var(--fg-muted); font-size: 12px; line-height: 1.5; }
.pv-doptional { margin-top: 12px; color: var(--fg-muted); font-size: 12px; }
.pv-doptional summary { cursor: pointer; padding: 4px 0; }
.pv-doptional summary:focus-visible { outline: 2px solid var(--gilt); outline-offset: 4px; }
.pv-auth .pv-derror:empty { display: none; }
.pv-dreason {
  margin: 0 0 12px; padding: 8px 12px; color: var(--parchment); line-height: 1.45;
  border-left: 2px solid var(--gilt); background: rgba(200, 170, 110, .07); border-radius: 0 8px 8px 0;
}
.pv-benefits { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.pv-benefits li { position: relative; padding-left: 20px; line-height: 1.4; }
.pv-benefits li::before {
  content: ""; position: absolute; left: 3px; top: 6px; width: 7px; height: 7px;
  transform: rotate(45deg); background: var(--gilt); border-radius: 1px;
}
.pv-benefits b { color: var(--parchment); font-weight: 600; }
.pv-benefits span { display: block; font-size: 12.5px; color: var(--fg-muted); }
.pv-dfield { display: block; margin: 12px 0 0; }
.pv-dfield > span { display: block; margin: 0 0 6px; font-size: 12.5px; color: var(--fg-dim); }
.pv-dfield input {
  width: 100%; min-height: 44px; padding: 9px 12px; font: inherit; font-size: 16px;
  color: var(--fg); background: var(--bg-sunken); border: 1px solid var(--border); border-radius: 10px;
  box-sizing: border-box;
}
.pv-dfield input:focus { outline: none; border-color: var(--gilt-soft); box-shadow: 0 0 0 3px rgba(200, 170, 110, .12); }
.pv-dfield small { display: block; margin-top: 5px; font-size: 11.5px; color: var(--fg-faint); line-height: 1.4; }
.pv-dlink {
  margin: 10px 0 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--fg-muted);
  background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.pv-dlink:hover { color: var(--fg); }
.pv-derror { min-height: 1.2em; margin: 12px 0 0; font-size: 13px; color: var(--neg-strong); }
.pv-dsubmit, .pv-dswap {
  display: block; width: 100%; min-height: 46px; margin-top: 12px; border-radius: 12px;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.pv-dsubmit { color: #fff; background: var(--accent); border: 0; }
.pv-dsubmit:hover { background: var(--pos-strong); }
.pv-dsubmit:disabled { opacity: .6; cursor: progress; }
.pv-dswap { color: var(--fg-dim); background: none; border: 1px solid var(--border); font-weight: 500; font-size: 14px; }
.pv-dswap:hover { color: var(--fg); border-color: var(--gilt-soft); }
.pv-dlegal { margin: 10px 0 0; font-size: 11.5px; color: var(--fg-faint); line-height: 1.45; }
.pv-dlegal a { color: var(--fg-muted); }

/* ------------------------------------------------------------ footer ---- */
/* `page_shell.footer`: on every public page, and under the app's views. */
.pv-foot {
  margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--hairline);
}
.pv-links {
  margin-top: var(--s3); font-size: var(--fs-small); color: var(--fg-muted);
  display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4);
}
.pv-links a { color: var(--fg-muted); }
.pv-tagline { margin: var(--s4) 0 0; font-size: var(--fs-small); color: var(--fg-dim); max-width: 68ch; }
.pv-links a:hover { color: var(--accent); }
.pv-disclaimer { margin-top: var(--s2); font-size: var(--fs-caption); color: var(--fg-faint); }
.pv-app-foot { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px;
  font-family: var(--sans); line-height: 1.6; }

/* ------------------------------------------------------------- toast ---- */
.pv-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; max-width: calc(100vw - 32px);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 12px; font-size: 14px; color: var(--parchment);
  background: var(--bg-floating); border: 1px solid var(--gilt-soft);
  box-shadow: 0 18px 50px -12px #000;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.pv-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------- Watch / I own this (card) -- */
.pv-mine { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.pv-mine[hidden] { display: none; }
.pv-mine-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--fg-dim); cursor: pointer;
  background: var(--bg-panel); border: 1px solid var(--gilt-line); border-radius: 999px;
  transition: border-color 150ms var(--ease), color 150ms var(--ease), background 150ms var(--ease);
}
.pv-mine-btn:hover { color: var(--parchment); border-color: var(--gilt-soft); }
.pv-mine-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; }
.pv-mine-btn[aria-pressed="true"] {
  color: var(--parchment); border-color: var(--gilt); background: rgba(200, 170, 110, .12);
}
.pv-mine-btn[aria-pressed="true"] svg { fill: var(--gilt); stroke: var(--gilt); }
.pv-mine-note { flex-basis: 100%; margin: 2px 0 0; font-size: 12px; color: var(--fg-faint); display: none; }
.pv-mine-guest .pv-mine-note { display: block; }

/* ------------------------------------------- "make it yours" (homepage) -- */
.pv-joinband {
  position: relative; overflow: hidden; margin-top: 56px; padding: 30px 32px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center;
  background: radial-gradient(120% 140% at 0% 0%, rgba(200, 170, 110, .12), transparent 55%),
              var(--panel-grad), var(--bg-panel);
  border: 1px solid var(--gilt-line); border-radius: 18px;
}
.pv-joinband[hidden] { display: none; }
.pv-joinband .pv-dkicker { margin-bottom: 6px; }
.pv-joinband h2 {
  margin: 0 0 8px; font-family: var(--display); font-size: 24px; color: var(--parchment);
  text-transform: none; letter-spacing: -.01em;
}
.pv-joinband h2::after { display: none; }
.pv-joinband p { margin: 0; color: var(--fg-dim); max-width: 46ch; }
.pv-joinband .pv-benefits { margin: 0 0 16px; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.pv-joinband-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pv-joinband-go .pv-join { min-height: 42px; padding: 0 20px; font-size: 14px; }
.pv-joinband-go .pv-signin { font-size: 13px; }

/* ------------------------------------------------------------- phone ---- */
@media (max-width: 860px) {
  .pv-search { display: none; }
}
@media (max-width: 640px) {
  .pv-foot .pv-links { gap: 0 var(--s1); }
  .pv-foot .pv-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
  .pv-foot .pv-links a:first-child { margin-left: -6px; }
  .pv-site-in { flex-wrap: wrap; gap: 0 8px; padding: 6px 16px 0; min-height: 0; }
  .pv-brand { min-height: 48px; }
  .pv-account { margin-left: auto; min-width: 0; }
  .pv-avatar-name { display: none; }
  .pv-avatar-btn { padding: 3px; }
  .pv-site-nav {
    order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 10px; overflow-x: auto;
    scrollbar-width: none; border-top: 1px solid var(--hairline);
  }
  .pv-site-nav::-webkit-scrollbar { display: none; }
  .pv-site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; }
  .pv-menu { position: fixed; left: 12px; right: 12px; top: 58px; min-width: 0; }
  .pv-dialog { padding: 26px 20px 20px; }
  .pv-joinband { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; margin-top: 40px; }
  .pv-joinband .pv-benefits { grid-template-columns: minmax(0, 1fr); }
}
