/* Staging screens: hub, lock, brand builder (A6), broker approval (B1), results (A7), seller report (A8).
   Only CSS variables from styles.css + brand.css are used, so a theme from tools/oh-staging/themes/ swaps the look.
   Defaults below apply only where no brand.css loads (hub and lock pages). */
/* Scoped to the hub and lock pages ONLY: on a tenant page these would override the agent's brand.css (load order). */
body.hub, body.lock { --accent: #1F5F7A; --deep: #13303D; --bg: #F5F7F8; --ink: #15202B; --highlight: #1F5F7A; --on-highlight: #FFFFFF; --highlight-dark: #7CC4E0; }
.hour-bar { justify-self: center; width: min(56px, 80%); }

/* honest label on every visitor screen */
.staging-ribbon { position: fixed; z-index: 50; left: 50%; top: 0; transform: translateX(-50%); background: #2b2b2b; color: #fff;
  font: 700 10px/1 -apple-system, system-ui, sans-serif; letter-spacing: .08em; padding: 4px 9px 5px; border-radius: 0 0 6px 6px; opacity: .8; pointer-events: none; white-space: nowrap; }

/* lock page */
body.lock { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.lockcard { max-width: 380px; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; }
.lockcard h1 { margin: 4px 0 8px; font-size: 26px; }
.lockcard form { display: grid; gap: 12px; margin-top: 12px; }
.lockcard label { display: grid; gap: 6px; font-weight: 600; }
.lockcard input { font: inherit; font-size: 18px; min-height: 52px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 14px; }
.lockcard button { font: inherit; font-weight: 700; font-size: 18px; min-height: 52px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* hub */
.hubbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--deep); color: #fff; }
.hub-mark { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.hub-mark img { width: 34px; height: 34px; border-radius: 8px; }
.hub-mark small { font-weight: 500; opacity: .75; }
.hub-sub { opacity: .8; font-size: 15px; }
.stage-pill { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: .1em; background: #ffd66b; color: #3a2a00; border-radius: 999px; padding: 4px 9px; }
.hubpage { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
.hubpage.narrow { max-width: 620px; }
.hubpage h2 { font-size: 20px; margin: 28px 0 10px; }
.hub-hero { padding: 18px 0 8px; }
.hub-hero h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.05; letter-spacing: -.02em; margin: 8px 0 12px; max-width: 16ch; }
.hub-lead { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 60ch; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tile { display: grid; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--ink); text-decoration: none; }
.tile span { color: var(--muted); }
.tile .row { margin-top: 8px; flex-wrap: wrap; }
.tile .btn { font-size: 15px; min-height: 44px; }
.flags ul { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.7; }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; font-size: 14px; color: var(--muted); }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-right: 6px; background: #e6e8ea; font-weight: 700; }
.steps li.on { color: var(--ink); font-weight: 700; }
.steps li.on::before { background: var(--accent); color: #fff; }
.card h2:not(:first-child) { margin-top: 22px; }
.hubpage .card > h2:first-child, .page .card > h2:first-child { margin-top: 0; }
.card form, form.card { display: grid; gap: 12px; }
.row2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
fieldset.seg { border: 0; padding: 0; margin: 0; }
fieldset.seg .choice { display: inline-flex; margin-right: 8px; }

/* sign-in */
.signin-card { display: grid; gap: 14px; }
.signin-card h1 { margin: 0; font-size: 26px; }
button.google { display: flex; align-items: center; justify-content: center; gap: 10px; }
.g-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #4285F4; font-weight: 800; font-size: 16px; }
.keybox summary { cursor: pointer; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
.keybox form { display: grid; gap: 10px; }

/* brand builder */
.admin .page:has(.builder) { max-width: 1240px; }
.builder { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .builder { grid-template-columns: minmax(380px, 1fr) minmax(440px, 1.25fr); align-items: start; } .b-preview { position: sticky; top: 76px; } }
.b-form { display: grid; gap: 12px; }
.assets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.asset { display: grid; gap: 8px; justify-items: start; }
.asset-prev { width: 100%; height: 96px; border-radius: 12px; border: 1px dashed var(--line-strong); display: grid; place-items: center; overflow: hidden; background: #fff; }
.asset-prev.dark { background: var(--deep); }
.asset-prev img { max-width: 92%; max-height: 84px; object-fit: contain; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { display: flex; width: 56px; height: 44px; border-radius: 10px; overflow: hidden; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); padding: 0; cursor: pointer; }
.swatch span { flex: 1; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 52px; height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 2px; background: #fff; }
.color-row input:not([type=color]) { flex: 1; font-family: ui-monospace, Menlo, monospace; }
.pill.st-approved { background: #e3f4ea; color: var(--ok); }
.pill.st-pending { background: #fff3d6; color: var(--warn); }
.pill.st-changes { background: #fdecea; color: var(--err); }
.prev-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.builder > *, .ap-grid > * { min-width: 0; }
.device { position: relative; overflow: hidden; width: calc(100% - 20px); border-radius: 22px; background: #111; box-shadow: 0 0 0 10px #1d1d1f, 0 20px 50px rgba(0,0,0,.18); margin: 10px; }
.device.phone { max-width: 320px; margin: 10px auto; border-radius: 34px; }
.color-row input[type=text] { min-width: 0; }
.device iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; display: block; background: var(--bg); }
.banner.info { background: #e8f1f6; color: #12354a; border-color: #c4dbe8; }
.banner.warn { background: #fdecea; color: #5c1a14; border-color: #f2c4bf; }
.banner .btn { margin-left: 6px; font-size: 15px; min-height: 40px; }
.tag.ok { background: #e3f4ea; color: var(--ok); }

/* approval */
.ap-head h1 { font-size: clamp(26px, 4.5vw, 40px); margin: 6px 0 10px; letter-spacing: -.01em; }
.ap-grid { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 1000px) { .ap-grid { grid-template-columns: 1.3fr 1fr; align-items: start; } .ap-preview { position: sticky; top: 76px; } }
.ap-side { display: grid; gap: 12px; }
.checks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 6px; line-height: 1.45; }
.checks li > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 800; font-size: 13px; }
.checks li.ok > span { background: #e3f4ea; color: var(--ok); }
.checks li.warn > span { background: #fff3d6; color: var(--warn); }
.wording dt { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 12px; }
.wording dd { margin: 4px 0 0; line-height: 1.5; }
.record h2 { color: var(--ok); }
textarea { font: inherit; font-size: 16px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; width: 100%; resize: vertical; }
select { font: inherit; font-size: 16px; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 10px; background: #fff; }

/* results + report */
.rep-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
@media (min-width: 640px) { .rep-stats { grid-template-columns: repeat(4, 1fr); } }
.rep-stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; }
.rep-stats b { font-size: 34px; line-height: 1.05; color: var(--deep); font-variant-numeric: tabular-nums; }
.rep-stats span { color: var(--muted); font-size: 14px; }
.rep-stats.small b { font-size: 28px; }
.report { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; margin-top: 12px; }
.rep-demo { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--warn); background: #fff3d6; border-radius: 8px; padding: 6px 10px; display: inline-block; }
.rep-eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--highlight); }
.rep-head h1 { margin: 6px 0 4px; font-size: clamp(26px, 5vw, 38px); line-height: 1.1; }
.rep-head h1 span { display: block; font-size: .55em; font-weight: 500; color: var(--muted); margin-top: 4px; }
.rep-when { color: var(--muted); margin: 0; }
.rep-hook { font-size: clamp(20px, 3.4vw, 26px); font-weight: 700; line-height: 1.3; margin: 18px 0 4px; max-width: 34ch; }
.rep-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .rep-grid { grid-template-columns: 1fr 1fr; } }
.rep-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; break-inside: avoid; }
.rep-card h2 { font-size: 16px; margin: 0 0 10px; }
.bars { display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 30px; gap: 8px; align-items: center; font-size: 14px; }
.bar-track { height: 12px; border-radius: 6px; background: #eef0f2; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: 6px; }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; }
.hours { display: flex; gap: 6px; align-items: flex-end; height: 140px; padding-top: 6px; }
.hour { flex: 1; display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; font-size: 13px; }
.hour-bar { align-self: end; height: var(--h, 0%); background: var(--deep); border-radius: 6px 6px 0 0; min-height: 3px; }
.rep-note { margin-top: 14px; border-left: 4px solid var(--accent); padding: 4px 0 4px 14px; }
.rep-note h2 { font-size: 16px; margin: 0 0 6px; }
.rep-foot { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.report-wrap { max-width: 900px; }
@media print {
  .topbar, .no-print, .staging-ribbon, .hubbar, .toast { display: none !important; }
  body, html { background: #fff !important; }
  .page, .hubpage { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; }
  .rep-grid { grid-template-columns: 1fr 1fr; }
  .bar-fill, .hour-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
