html, body, #root { margin: 0; min-height: 100%; }
body { background: #ffffff; }

/* ---------- micro type + chips ---------- */
.sb-micro { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; color: #585254; }
.sb-micro[data-state="live"] { color: #c2410c; }
.sb-chip { display: inline-block; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 9.5px; letter-spacing: 0.09em; text-transform: uppercase; padding: 3px 8px; border: 1px solid #eae9ea; border-radius: 999px; color: #585254; white-space: nowrap; }
.sb-chip[data-tone="pending"] { border-style: dashed; }
.sb-chip[data-tone="target"] { border-color: #c2410c; color: #c2410c; }

/* ---------- tabs ---------- */
.sb-stageribbon { position: sticky; top: 0; z-index: 99; background: #c2410c; color: #fff; text-align: center; font: 600 11px/28px ui-monospace, monospace; letter-spacing: .12em; }
.sb-topbar { position: sticky; top: 28px; z-index: 98; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid #eae9ea; }
.sb-topbar-in { max-width: 1040px; margin: 0 auto; padding: 0 24px; min-height: 48px; display: flex; align-items: center; gap: 24px; }
.sb-brand { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; color: #251f21; text-decoration: none; white-space: nowrap; }
.sb-brand-ver { color: #c2410c; font-size: 9px; font-weight: 400; letter-spacing: 0.12em; margin-left: 8px; }
.sb-appnav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.sb-appnav::-webkit-scrollbar { display: none; }
.sb-appnav a { padding: 6px 11px; border-radius: 6px; color: #585254; text-decoration: none; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; display: inline-flex; align-items: center; min-height: 32px; }
.sb-appnav a:hover { background: #f4f2f0; color: #251f21; }
.sb-appnav a[aria-current="page"] { background: #251f21; color: #fff; }
.sb-topstatus { display: flex; align-items: center; gap: 7px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 9.5px; letter-spacing: 0.1em; color: #251f21; white-space: nowrap; }
.sb-dot-live { width: 7px; height: 7px; border-radius: 50%; background: #c2410c; }
.sb-status-pend { border: 1px dashed #d8d4d5; color: #585254; padding: 2px 7px; border-radius: 999px; }
.sb-context { font-size: 12.5px; line-height: 19px; color: #585254; max-width: 720px; margin: 0 0 16px; }
.sb-brand-stg { display: none; font-family: ui-monospace, monospace; font-size: 8.5px; letter-spacing: .12em; color: #c2410c; border: 1px solid #c2410c; border-radius: 999px; padding: 1px 6px; margin-left: 8px; }
@media (max-width: 760px) { .sb-brand-stg { display: inline-block; } }
@media (max-width: 760px) { .sb-topstatus { display: none; } .sb-topbar-in { gap: 14px; padding: 0 16px; } .sb-brand-ver { display: none; } }
@media (max-width: 760px) { .sb-appnav { display: none; } }
.sb-tabbar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
  .sb-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 97; background: rgba(255,255,255,0.96); backdrop-filter: blur(6px); border-top: 1px solid #eae9ea; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .sb-tabbar a { flex: 1; text-align: center; padding: 9px 2px 10px; font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #585254; text-decoration: none; border-top: 2px solid transparent; margin-top: -1px; }
  .sb-tabbar a[aria-current="page"] { color: #251f21; font-weight: 700; border-top-color: #c2410c; }
}
@media (max-width: 600px) { .sb-stageribbon { position: static; } .sb-topbar { top: 0; } }
@media (max-width: 600px) { .sb-appnav a { min-height: 40px; padding: 6px 9px; } }

/* ---------- banner ---------- */
.sb-banner { position: relative; border: 1px solid #eae9ea; border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.sb-banner img { display: block; width: 100%; height: 148px; object-fit: cover; }
.sb-banner-chip { position: absolute; left: 10px; bottom: 10px; }
.sb-banner-chip .sb-chip { background: rgba(255,255,255,0.92); }

/* ---------- grids + panels (hairline instrument grid) ---------- */
.sb-grid { display: grid; gap: 0; background: transparent; border: 1px solid #eae9ea; border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.sb-grid > * { border-right: 1px solid #eae9ea; border-bottom: 1px solid #eae9ea; margin: 0 -1px -1px 0; }
.sb-grid-hero { grid-template-columns: 1fr; }
.sb-grid-2 { grid-template-columns: 1fr; }
.sb-grid-3 { grid-template-columns: repeat(2, 1fr); }
.sb-grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .sb-grid-2 { grid-template-columns: 1fr 1fr; } .sb-grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .sb-grid-hero { grid-template-columns: 1.2fr 1fr 1fr; } .sb-grid-4 { grid-template-columns: repeat(4, 1fr); } }
.sb-panel { background: #ffffff; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sb-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-panel-foot { font-size: 12px; line-height: 18px; color: #585254; }
.sb-price-value { font-size: 22px; font-variant-numeric: tabular-nums; }
.sb-potential { display: flex; align-items: baseline; gap: 6px; padding: 18px 0; }
.sb-potential-value { font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; color: #c2410c; }

/* ---------- tiles ---------- */
.sb-tile { background: #ffffff; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 96px; }
.sb-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-tile-value { font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.sb-tile-unit { font-size: 11px; color: #585254; margin-left: 6px; }
.sb-tile-note { font-size: 12px; line-height: 17px; color: #585254; }
.sb-tile-id { margin-top: auto; }
.sb-dash { color: #c0bebf; }
.sb-locked { border: none; background: repeating-linear-gradient(-45deg, #ffffff, #ffffff 10px, #faf8f7 10px, #faf8f7 11px); }
.sb-lock { color: #c0bebf; }
.sb-dot { width: 7px; height: 7px; border-radius: 50%; background: #585254; flex: none; }
.sb-dot[data-band="good"] { background: #251f21; }
.sb-dot[data-band="ok"] { background: #585254; }
.sb-dot[data-band="low"] { background: #c2410c; }

/* ---------- bars ---------- */
.sb-bar { height: 3px; background: #eae9ea; border-radius: 2px; overflow: hidden; }
.sb-bar-fill { height: 100%; background: #251f21; border-radius: 2px; }
.sb-bar-fill[data-band="low"] { background: #c2410c; }
.sb-bar-fill[data-band="ok"] { background: #585254; }

/* ---------- ring ---------- */
.sb-ring-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.sb-ring-track { fill: none; stroke: #eae9ea; stroke-width: 5; }
.sb-ring-arc { fill: none; stroke: #c2410c; stroke-width: 5; stroke-linecap: round; }
.sb-ring-pending { stroke: #eae9ea; stroke-dasharray: 2 7; }
.sb-ring-value { font-size: 30px; fill: #251f21; font-variant-numeric: tabular-nums; }
.sb-ring-max { font-size: 10px; fill: #585254; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 0.08em; }
.sb-ring-sub { font-size: 12px; color: #585254; max-width: 220px; }

/* ---------- plan ---------- */
.sb-plan { display: flex; flex-direction: column; border: 1px solid #eae9ea; border-radius: 12px; overflow: hidden; }
.sb-plan-row { display: flex; align-items: center; gap: 12px; padding: 14px; background: #ffffff; border: none; border-bottom: 1px solid #eae9ea; font: inherit; text-align: left; cursor: pointer; min-height: 48px; }
.sb-plan-row:last-child { border-bottom: none; }
.sb-plan-row[data-done="true"] .sb-plan-text { color: #585254; text-decoration: line-through; }
.sb-plan-text { flex: 1; font-size: 14px; line-height: 20px; }
.sb-check { width: 20px; height: 20px; flex: none; border: 1px solid #251f21; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #c2410c; }

/* ---------- trend empty state ---------- */
.sb-trend-empty { display: flex; flex-direction: column; gap: 8px; }
.sb-trend-frame { border: 1px dashed #eae9ea; border-radius: 12px; min-height: 120px; display: flex; align-items: center; justify-content: center; }

/* ---------- capture ---------- */
.sb-capture { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.sb-viewfinder { position: relative; border: 1px solid #eae9ea; border-radius: 12px; min-height: 220px; display: flex; align-items: center; justify-content: center; background: #ffffff; }
.sb-viewfinder-center { text-align: center; max-width: 320px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.sb-viewfinder-sub { font-size: 13px; line-height: 19px; color: #585254; }
.sb-corner { position: absolute; width: 22px; height: 22px; border: 2px solid #251f21; }
.sb-c1 { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.sb-c2 { top: 14px; right: 14px; border-left: none; border-bottom: none; }
.sb-c3 { bottom: 14px; left: 14px; border-right: none; border-top: none; }
.sb-c4 { bottom: 14px; right: 14px; border-left: none; border-top: none; }

/* ---------- pipeline ---------- */
.sb-pipe { display: grid; gap: 1px; background: #eae9ea; border: 1px solid #eae9ea; border-radius: 12px; overflow: hidden; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sb-pipe { grid-template-columns: 1fr 1fr; } }
.sb-pipe-step { background: #ffffff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.sb-pipe-step[data-live="false"] { opacity: 0.62; }
.sb-pipe-n { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11px; color: #c2410c; }
.sb-pipe-step[data-live="false"] .sb-pipe-n { color: #c0bebf; }
.sb-pipe-name { flex: 1; font-size: 13px; }

/* ---------- disclosure ---------- */
.sb-disclosure { border: 1px solid #eae9ea; border-radius: 12px; margin: 16px 0; overflow: hidden; }
.sb-disclosure-head { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #ffffff; border: none; font: inherit; cursor: pointer; min-height: 48px; }
.sb-disclosure-caret { font-size: 16px; color: #c2410c; }
.sb-disclosure-body { padding: 4px 16px 16px; border-top: 1px solid #eae9ea; }
.sb-bullets { margin: 8px 0; padding-left: 20px; font-size: 14px; line-height: 22px; color: #585254; }
.sb-numlist { margin: 4px 0; padding-left: 22px; font-size: 14px; line-height: 24px; }
.sb-numlist li::marker { color: #585254; }

/* ---------- admin ---------- */
.sb-input { display: block; width: 100%; margin-bottom: 8px; padding: 10px; font: inherit; border: 1px solid #eae9ea; border-radius: 8px; background: #ffffff; box-sizing: border-box; }
.sb-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eae9ea; flex-wrap: wrap; }
.sb-admin-form { display: block; }
.sb-admin-actions { display: flex; gap: 8px; }
.sb-admin-meta { font-size: 13px; color: #585254; }
.sb-file-label { display: block; font-size: 13px; margin-bottom: 8px; }
.sb-btn { font: inherit; padding: 9px 16px; border-radius: 999px; border: 1px solid #251f21; background: #251f21; color: #ffffff; cursor: pointer; min-height: 40px; }
.sb-btn[data-variant="secondary"] { background: transparent; color: #251f21; }
.sb-btn:disabled { opacity: 0.4; cursor: default; }
.sb-status { display: inline-block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border: 1px solid #eae9ea; border-radius: 999px; }
.sb-status[data-state="published"] { border-color: #c2410c; color: #c2410c; }

.sb-capture .sb-btn { align-self: flex-start; }

/* ---------- public shell ---------- */
body { font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; color: #251f21; font-size: 14px; line-height: 24px; letter-spacing: -0.01em; }
.sb-shell { max-width: 1040px; margin: 0 auto; padding: 24px; }
@media (min-width: 768px) { .sb-shell { padding: 36px; } }
.sb-title { font-family: Georgia, 'Times New Roman', serif; font-size: 28px; letter-spacing: -0.025em; margin: 0 0 6px; }
@media (min-width: 768px) { .sb-title { font-size: 36px; } }
.sb-fact { color: #585254; font-size: 13px; margin: 0 0 10px; }
.sb-intro { font-size: 14px; line-height: 24px; max-width: 640px; margin: 0 0 22px; }
.sb-group { margin: 28px 0 16px; }
.sb-group-label { font-family: Georgia, 'Times New Roman', serif; font-size: 21px; letter-spacing: -0.025em; margin: 0 0 14px; }
.sb-caption { font-size: 12px; line-height: 18px; color: #585254; margin: 8px 0; }
.sb-para { font-size: 14px; line-height: 24px; margin: 0 0 12px; }
.sb-callout { border: 1px solid #eae9ea; border-left: 3px solid #c2410c; border-radius: 8px; padding: 12px 14px; margin: 12px 0; background: #fff; }
.sb-callout-title { font-weight: 600; margin-bottom: 4px; }
.sb-callout[data-tone="warning"] { background: #f4efec; border-left-color: #c2410c; }
.sb-photos { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 12px 0; }
@media (min-width: 640px) { .sb-photos[data-count="2"] { grid-template-columns: 1fr 1fr; } }
.sb-photos img { width: 100%; border-radius: 12px; display: block; }
.sb-closing { font-size: 12px; line-height: 20px; color: #585254; border-top: 1px solid #eae9ea; margin-top: 36px; padding-top: 16px; }
.sb-rows { border-top: 1px solid #eae9ea; }
.sb-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid #eae9ea; align-items: baseline; }
.sb-row-n { color: #585254; flex: none; }
.sb-row-name { font-weight: 600; }
.sb-row-detail { color: #585254; font-size: 13px; line-height: 19px; }
#app [hidden] { display: none; }
.sb-route { display: none; }
.sb-route.active { display: block; }
.sb-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 19px; color: #585254; text-align: left; max-width: 320px; }
.sb-consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: #c2410c; flex: none; }
.sb-compare-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.sb-compare-toggle { display: inline-flex; gap: 6px; }
.sb-mini { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; padding: 5px 12px; border: 1px solid #eae9ea; border-radius: 999px; background: #fff; color: #585254; cursor: pointer; min-height: 32px; }
.sb-mini[aria-pressed="true"] { border-color: #c2410c; color: #c2410c; }
.sb-compare { position: relative; overflow: hidden; border: 1px solid #eae9ea; border-radius: 12px; aspect-ratio: 3 / 2; background: #f4f1ec; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.sb-compare-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.sb-compare-line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.18); pointer-events: none; }
.sb-compare-grip { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid rgba(0,0,0,0.18); display: flex; align-items: center; justify-content: center; font-size: 13px; letter-spacing: 1px; color: #c2410c; box-shadow: 0 1px 5px rgba(0,0,0,0.28); pointer-events: none; }
.sb-compare-grip:focus-visible { outline: 2px solid #c2410c; outline-offset: 2px; }
.sb-compare-chip { position: absolute; top: 10px; background: rgba(255,255,255,0.92); pointer-events: none; }
.sb-compare-chip-l { left: 10px; }
.sb-compare-chip-r { right: 10px; }

/* live report key-value rows for structured measurements */
.sb-tile-kv { margin: 6px 0 2px; }
.sb-tile-kv-row { display: flex; justify-content: space-between; gap: 12px; font: 11px/1.7 ui-monospace, 'SF Mono', Menlo, monospace; color: #251f21; }
.sb-tile-kv-row span { color: #585254; min-width: 0; }
.sb-tile-kv-row b { font-weight: 600; text-align: right; word-break: normal; overflow-wrap: break-word; hyphens: none; }
/* structured measurements read best full-width on small screens */
@media (max-width: 600px) { .sb-grid-report { grid-template-columns: 1fr; } }

/* ---------- dashboard action hero (v10) ---------- */
.sb-cta-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 0; border: 1px solid #eae9ea; border-radius: 12px; overflow: hidden; margin-bottom: 16px; background: #fff; }
.sb-cta-main { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.sb-cta-title { font-family: Georgia, 'Times New Roman', serif; font-size: 34px; letter-spacing: -0.025em; line-height: 1.05; }
.sb-cta-sub { font-size: 13px; line-height: 19px; color: #585254; margin: 0; max-width: 340px; }
.sb-cta-btn { text-decoration: none; display: inline-block; margin-top: 6px; }
.sb-cta-art { position: relative; min-height: 190px; }
.sb-cta-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 700px) { .sb-cta-hero { grid-template-columns: 1fr; } .sb-cta-art { min-height: 130px; order: -1; } .sb-cta-title { font-size: 28px; } }
.sb-pipe-dash { margin-bottom: 20px; }
@media (min-width: 900px) { .sb-pipe-dash { grid-template-columns: repeat(4, 1fr); } }
.sb-price-prem { border-color: #c2410c; box-shadow: inset 3px 0 0 #c2410c; }
