/* Product site, account pages and admin login.
   Loaded after /static/status.css, which provides the tokens (--sw-*), Inter,
   .sw-btn pills, .sw-badge and the footer theme switch — so the site and the
   tenant status pages share one look. Layout follows a Vercel-like grid. */

.site { min-height: 100vh; display: flex; flex-direction: column; background: var(--sw-bg); color: var(--sw-text); font-size: 15px; line-height: 1.6; }
.site main { flex: 1; }
.site-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--sw-border); background: color-mix(in srgb, var(--sw-bg) 80%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); }
.site-header .site-wrap { display: flex; align-items: center; gap: 32px; height: 64px; }
.site-wordmark { font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: var(--sw-text); }
.site-wordmark:hover { color: var(--sw-text); }
.site-nav { display: flex; gap: 24px; flex: 1; }
.site-nav a { font-size: 14px; color: var(--sw-muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--sw-text); }
.site-actions { display: flex; gap: 8px; align-items: center; }
.sw-btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }

/* ── Hero ── */
.hero { padding: 96px 0 0; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--sw-border) 1px, transparent 1px), linear-gradient(90deg, var(--sw-border) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 40%, transparent 100%); mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 40%, transparent 100%); }
.hero > * { position: relative; z-index: 1; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 10px; border: 1px solid var(--sw-border); border-radius: 9999px; background: var(--sw-card); font-size: 13px; color: var(--sw-muted); }
.hero-pill:hover { color: var(--sw-text); border-color: var(--sw-muted); }
.hero-pill .sw-pulse { --sw-status: var(--sw-ok); width: 8px; height: 8px; }
.hero h1 { margin: 24px auto 0; max-width: 14ch; font-size: clamp(44px, 7vw, 80px); line-height: 1; letter-spacing: -.045em; font-weight: 800; text-wrap: balance; }
.hero-lede { margin: 24px auto 0; max-width: 56ch; color: var(--sw-muted); font-size: 18px; text-wrap: pretty; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--sw-muted); }

/* Browser frame around screenshots; the image follows the theme. */
.frame { margin: 72px auto 0; max-width: 1040px; border: 1px solid var(--sw-border); border-radius: 14px; overflow: hidden; background: var(--sw-card);
  box-shadow: 0 0 0 1px rgba(0,0,0,.02), 0 24px 64px -24px rgba(0,0,0,.45); }
.frame-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--sw-border); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--sw-border); }
.frame-url { flex: 1; margin: 0 auto; max-width: 320px; text-align: center; font-family: var(--sw-mono); font-size: 12px; color: var(--sw-muted); background: var(--sw-bg); border: 1px solid var(--sw-border); border-radius: 6px; padding: 2px 10px; }
.frame img { display: block; width: 100%; height: auto; }
.frame .shot-light { display: none; }
:root[data-theme="light"] .frame .shot-light { display: block; }
:root[data-theme="light"] .frame .shot-dark { display: none; }
.hero .frame { margin-bottom: -1px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }

/* ── Sections ── */
.section { padding: 112px 0; border-top: 1px solid var(--sw-border); }
.eyebrow { font-family: var(--sw-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--sw-muted); }
.section h2 { margin: 12px 0 0; font-size: clamp(32px, 4.5vw, 48px); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
.section-lede { margin: 16px 0 0; max-width: 56ch; color: var(--sw-muted); font-size: 17px; text-wrap: pretty; }
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head.center .section-lede { margin-left: auto; margin-right: auto; }

/* Feature grid with hairlines (Vercel-style). */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--sw-border); border-radius: 12px; overflow: hidden; }
.grid > div { padding: 32px; border-right: 1px solid var(--sw-border); border-bottom: 1px solid var(--sw-border); background: var(--sw-bg); }
.grid > div:nth-child(3n) { border-right: 0; }
.grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.grid h3 { margin: 14px 0 8px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.grid p { margin: 0; color: var(--sw-muted); font-size: 14px; text-wrap: pretty; }
.grid-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--sw-border); border-radius: 9px; background: var(--sw-card); color: var(--sw-text); }
.grid-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.split .frame { margin: 0; }
.checks { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.checks li { display: flex; gap: 10px; color: var(--sw-muted); font-size: 15px; }
.checks li::before { content: "✓"; flex: none; color: var(--sw-ok); font-weight: 700; }

/* ── Pricing ── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 20px; padding: 28px; border: 1px solid var(--sw-border); border-radius: 12px; background: var(--sw-card); }
.plan.featured { border-color: var(--sw-text); box-shadow: 0 0 0 1px var(--sw-text); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-name { font-weight: 600; font-size: 15px; }
.plan-price { font-size: 44px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.plan-price span { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--sw-muted); }
.plan-desc { margin: -8px 0 0; color: var(--sw-muted); font-size: 14px; }
.plan ul { margin: 0; padding: 20px 0 0; list-style: none; display: grid; gap: 10px; border-top: 1px solid var(--sw-border); font-size: 14px; flex: 1; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: "✓"; color: var(--sw-ok); font-weight: 700; }
.plan li.no { color: var(--sw-muted); }
.plan li.no::before { content: "–"; color: var(--sw-muted); }
.plan li.lead { font-weight: 600; }
.plan li.lead::before { content: none; }
.plan .sw-btn { width: 100%; }
.plans-note { margin-top: 24px; text-align: center; color: var(--sw-muted); font-size: 14px; }

/* Final call to action. */
.cta { text-align: center; }
.cta .hero-ctas { margin-top: 28px; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--sw-border); padding: 56px 0 32px; }
.site-footer-top { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.site-footer h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.site-footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.site-footer-col a { color: var(--sw-muted); }
.site-footer-col a:hover { color: var(--sw-text); }
.site-footer-blurb { margin: 10px 0 0; max-width: 32ch; color: var(--sw-muted); font-size: 14px; }
.site-footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--sw-border); font-size: 13px; color: var(--sw-muted); }

/* ── Account pages and admin login ── */
.auth-page { display: grid; place-items: center; padding: 88px 24px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; padding: 32px; border: 1px solid var(--sw-border); border-radius: 12px; background: var(--sw-card); box-shadow: 0 24px 64px -32px rgba(0,0,0,.5); }
.auth-title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }
.auth-subtitle { margin: -8px 0 0; color: var(--sw-muted); font-size: 14px; }
.auth-card p { margin: 0; font-size: 14px; }
.auth-card [role="alert"] { padding: 10px 12px; border-radius: 8px; background: rgb(239 68 68 / .12); color: #f87171; font-size: 14px; }
:root[data-theme="light"] .auth-card [role="alert"] { color: rgb(153 27 27); }
.auth-card [role="status"] { padding: 10px 12px; border-radius: 8px; background: rgb(34 197 94 / .12); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .sw-btn { width: 100%; margin-top: 4px; }
.auth-footer { padding-top: 16px; border-top: 1px solid var(--sw-border); text-align: center; font-size: 14px; color: var(--sw-muted); }
.auth-footer a, .auth-card a.link { color: var(--sw-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sw-border); }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label { font-size: 13px; font-weight: 500; }
.input-hint { font-size: 12px; color: var(--sw-muted); }
.input { width: 100%; height: 40px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--sw-text); background: var(--sw-bg); border: 1px solid var(--sw-border); border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: var(--sw-muted); }
.input:focus { outline: none; border-color: var(--sw-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sw-text) 15%, transparent); }
select.input { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238b97a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.auth-brand { display: block; text-align: center; margin-bottom: 24px; }

/* ── Legal pages ── */
.legal-page { padding: 72px 0 96px; }
.legal-container { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.legal-container h1 { margin: 0; font-size: 40px; line-height: 1.1; letter-spacing: -.035em; font-weight: 800; }
.legal-updated { margin: 12px 0 40px; font-family: var(--sw-mono); font-size: 12px; color: var(--sw-muted); }
.legal-container h2 { margin: 40px 0 12px; font-size: 18px; letter-spacing: -.01em; }
.legal-container p, .legal-container li { color: var(--sw-muted); }
.legal-container a { color: var(--sw-text); text-decoration: underline; text-underline-offset: 3px; }

/* ── Docs ── */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.docs-sidebar { position: sticky; top: 64px; align-self: start; padding: 48px 0; display: flex; flex-direction: column; gap: 2px; }
.docs-sidebar-section { margin: 18px 0 6px; font-size: 12px; font-weight: 600; color: var(--sw-text); }
.docs-sidebar-section:first-child { margin-top: 0; }
.docs-sidebar-link { padding: 5px 10px; margin-left: -10px; border-radius: 6px; font-size: 14px; color: var(--sw-muted); }
.docs-sidebar-link:hover { color: var(--sw-text); background: var(--sw-hover); }
.docs-sidebar-link.active { color: var(--sw-text); background: var(--sw-card); box-shadow: inset 0 0 0 1px var(--sw-border); }
.docs-content { min-width: 0; padding: 48px 0 96px; max-width: 760px; }
.docs-content h1 { margin: 0 0 16px; font-size: 36px; line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.docs-content h2 { margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--sw-border); font-size: 22px; letter-spacing: -.02em; }
.docs-content h3 { margin: 28px 0 8px; font-size: 16px; }
.docs-content p, .docs-content li { color: var(--sw-muted); }
.docs-content a { color: var(--sw-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sw-border); }
.docs-content code { font-family: var(--sw-mono); font-size: .88em; padding: 1px 5px; border: 1px solid var(--sw-border); border-radius: 5px; background: var(--sw-card); color: var(--sw-text); }
.docs-content pre { margin: 16px 0; padding: 16px; overflow-x: auto; border: 1px solid var(--sw-border); border-radius: 10px; background: var(--sw-card); }
.docs-content pre code { padding: 0; border: 0; background: none; font-size: 13px; line-height: 1.6; }
.docs-content table { width: 100%; margin: 16px 0 24px; border-collapse: collapse; font-size: 14px; }
.docs-content th, .docs-content td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--sw-border); vertical-align: top; }
.docs-content th { color: var(--sw-text); font-weight: 600; }
.docs-content td { color: var(--sw-muted); }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .grid, .plans, .split { grid-template-columns: 1fr; }
  .grid > div { border-right: 0; }
  .grid > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--sw-border); }
  .grid > div:last-child { border-bottom: 0; }
  .site-footer-top { grid-template-columns: 1fr 1fr; }
  .docs-layout { grid-template-columns: 1fr; gap: 0; }
  .docs-sidebar { position: static; padding: 24px 0 0; }
  .section { padding: 80px 0; }
}

/* ── Brand mark and avatars ── */
.site-wordmark { display: inline-flex; align-items: center; gap: 8px; }
/* Signal head: text-colored body, unlit lamps cut out, bottom lamp lit green. */
.logo-mark { display: inline-flex; flex: none; }
.logo-mark svg { display: block; width: 12px; height: 22px; fill: var(--sw-text); }
.logo-mark .logo-lamp { fill: var(--sw-ok); }
/* Gradient avatar from two hues (set per name in the template), like Vercel's. */
.avatar { display: inline-block; width: 20px; height: 20px; border-radius: 50%; flex: none; vertical-align: middle;
  background: linear-gradient(135deg, hsl(var(--h1, 210) 85% 62%), hsl(var(--h2, 280) 80% 55%));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12); }
.avatar-sm { width: 16px; height: 16px; }
