
.sbe-wrap {
  --sbe-heading: #f8f812;
  --sbe-text: #ffffff;
  --sbe-muted: rgba(255,255,255,0.78);
  --sbe-accent: #f8f812;
  --sbe-overlay-strength: .76;
  --sbe-blur: 18px;
  --sbe-card-bg: rgba(9, 12, 20, var(--sbe-overlay-strength));
  --sbe-card-soft: rgba(14, 18, 28, calc(var(--sbe-overlay-strength) - .08));
  --sbe-surface-soft: rgba(248,248,18,0.08);
  --sbe-border: rgba(255,255,255,0.14);
  --sbe-border-strong: rgba(248,248,18,0.28);
  color: var(--sbe-text);
  width: 100%;
}
.sbe-wrap * { box-sizing: border-box; }
.sbe-wrap a { color: var(--sbe-heading); }
.sbe-wrap h1,
.sbe-wrap h2,
.sbe-wrap h3,
.sbe-wrap h4,
.sbe-wrap strong,
.sbe-wrap label { color: var(--sbe-heading); }

.sbe-hero,
.sbe-card,
.sbe-stage-card,
.sbe-project-item,
.sbe-snapshot-item,
.sbe-results-block,
.sbe-notice,
.sbe-metric-card,
.sbe-blueprint-item {
  border: 1px solid var(--sbe-border);
  background: var(--sbe-card-bg);
  backdrop-filter: blur(var(--sbe-blur));
  -webkit-backdrop-filter: blur(var(--sbe-blur));
  box-shadow: 0 18px 45px rgba(0,0,0,0.16);
}

.sbe-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
  margin-bottom: 1.5rem;
}
.sbe-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(248,248,18,0.09), rgba(255,255,255,0.02));
}
.sbe-hero > * { position: relative; z-index: 1; }
.sbe-hero-compact { grid-template-columns: 1fr; }
.sbe-hero-copy h1 { margin: 0 0 0.75rem; font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1.05; }
.sbe-hero-copy p,
.sbe-stage-card p,
.sbe-card p,
.sbe-card small,
.sbe-inline-link,
.sbe-snapshot-item div:not(.sbe-project-head):not(.sbe-snapshot-total),
.sbe-empty-inline { color: var(--sbe-muted); }

.sbe-eyebrow,
.sbe-kicker,
.sbe-stage-step,
.sbe-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  border: 1px solid var(--sbe-border-strong);
  background: rgba(248,248,18,0.08);
  color: var(--sbe-heading);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .4rem .75rem;
}

.sbe-card-head,
.sbe-project-head,
.sbe-results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .85rem;
  flex-wrap: wrap;
}
.sbe-stage-grid,
.sbe-grid,
.sbe-metric-grid,
.sbe-form-grid,
.sbe-totals-grid { display: grid; gap: 1rem; }
.sbe-stage-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 1.5rem; }
.sbe-stage-card,
.sbe-card,
.sbe-results-block,
.sbe-notice { border-radius: 24px; padding: 1.25rem; }
.sbe-card-rich { padding: 1.35rem; }
.sbe-stage-card h3,
.sbe-card h2,
.sbe-card h3,
.sbe-results-block h3 { margin: .45rem 0 .4rem; }
.sbe-grid-estimator-layout { grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.15fr); align-items: start; margin-bottom: 1.5rem; }
.sbe-grid-sidebars,
.sbe-grid-projects-page,
.sbe-grid-results-page { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.sbe-form-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sbe-form-row { display: grid; gap: .45rem; }
.sbe-form-row-full { grid-column: 1 / -1; }
.sbe-card textarea,
.sbe-card input,
.sbe-card select {
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  border: 1px solid var(--sbe-border-strong);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  color: var(--sbe-text);
  padding: .8rem .95rem;
}
.sbe-card textarea { min-height: 120px; resize: vertical; }
.sbe-card input::placeholder,
.sbe-card textarea::placeholder { color: rgba(255,255,255,0.56); }
.sbe-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .75rem; }
.sbe-actions-hero { margin-top: 1.15rem; }
.sbe-actions-inline { margin-top: .85rem; }
.sbe-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 46px;
  padding: .75rem 1rem;
  text-decoration: none;
  border-radius: 14px;
  border: 1px solid var(--sbe-border-strong);
  background: rgba(255,255,255,0.05);
  color: var(--sbe-heading);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sbe-button:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.sbe-button-primary { background: rgba(248,248,18,0.12); color: var(--sbe-heading); border-color: rgba(248,248,18,0.36); }
.sbe-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sbe-metric-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sbe-metric-card,
.sbe-snapshot-item,
.sbe-project-item,
.sbe-blueprint-item { border-radius: 18px; padding: 1rem; }
.sbe-metric-card span,
.sbe-metric-card small { display: block; color: var(--sbe-muted); }
.sbe-metric-card strong { display: block; margin: .35rem 0; font-size: clamp(1.45rem, 2vw, 2rem); color: var(--sbe-heading); }
.sbe-project-list,
.sbe-snapshot-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.sbe-snapshot-total,
.sbe-results-grand { font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 700; letter-spacing: -.02em; color: var(--sbe-heading); }
.sbe-results,
.sbe-notice,
.sbe-inline-feedback { margin-top: 1rem; }
.sbe-save-banner { margin-top: 1rem; padding: 1rem; border: 1px dashed var(--sbe-border-strong); border-radius: 18px; background: var(--sbe-card-soft); }
.sbe-totals { display: grid; gap: .45rem; }
.sbe-totals-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin-bottom: 1rem; }
.sbe-totals-grid p,
.sbe-totals p { margin: 0; padding: .85rem .95rem; border-radius: 16px; background: rgba(255,255,255,0.04); border: 1px solid var(--sbe-border); display: flex; justify-content: space-between; gap: .75rem; color: var(--sbe-text); }
.sbe-totals-grid p span { font-weight: 700; color: var(--sbe-heading); }
.sbe-table-scroll { overflow-x: auto; }
.sbe-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 560px; }
.sbe-table th,
.sbe-table td { text-align: left; padding: .8rem .85rem; border-bottom: 1px solid var(--sbe-border); color: var(--sbe-text); }
.sbe-table thead th { background: rgba(248,248,18,0.08); position: sticky; top: 0; color: var(--sbe-heading); }
.sbe-inline-link a { text-decoration: none; }
.sbe-inline-link a:hover { text-decoration: underline; }
.sbe-blueprint-list { display: grid; gap: .7rem; margin-top: .85rem; }
.sbe-blueprint-item { display: flex; justify-content: space-between; gap: 1rem; align-items: center; background: rgba(255,255,255,0.03); }
.sbe-blueprint-item small { display: block; color: var(--sbe-muted); }
.sbe-blueprint-manager { margin-top: .9rem; }
.sbe-snapshot-edit-form,
.sbe-blueprint-upload-form { margin-top: .9rem; }
.sbe-mode-inherit .sbe-hero,
.sbe-mode-inherit .sbe-card,
.sbe-mode-inherit .sbe-stage-card,
.sbe-mode-inherit .sbe-project-item,
.sbe-mode-inherit .sbe-snapshot-item,
.sbe-mode-inherit .sbe-results-block,
.sbe-mode-inherit .sbe-notice,
.sbe-mode-inherit .sbe-metric-card,
.sbe-mode-inherit .sbe-blueprint-item { background: rgba(0,0,0,var(--sbe-overlay-strength)); }

@media (max-width: 960px) {
  .sbe-hero,
  .sbe-grid-estimator-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sbe-wrap { font-size: .98rem; }
  .sbe-hero,
  .sbe-card,
  .sbe-stage-card,
  .sbe-results-block,
  .sbe-notice { border-radius: 20px; }
  .sbe-form-grid-two,
  .sbe-metric-grid,
  .sbe-metric-grid-three,
  .sbe-totals-grid { grid-template-columns: 1fr; }
  .sbe-hero { padding: 1.35rem; }
  .sbe-card-rich { padding: 1rem; }
  .sbe-table { min-width: 480px; }
  .sbe-blueprint-item { flex-direction: column; align-items: stretch; }
}

/* Plan Assist v1 */
.sbe-plan-assist{display:flex;flex-direction:column;gap:18px}
.sbe-plan-toolbar{display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid rgba(255,255,255,.14);border-radius:18px;background:rgba(255,255,255,.04)}
.sbe-plan-scale-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.sbe-plan-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,.9fr);gap:18px;align-items:start}
.sbe-plan-viewer,.sbe-plan-sidebar{display:flex;flex-direction:column;gap:16px}
.sbe-plan-stage{position:relative;min-height:560px;max-height:78vh;border-radius:22px;border:1px solid rgba(255,255,255,.12);overflow:auto;background:rgba(0,0,0,.22);overscroll-behavior:contain}
.sbe-plan-scene{position:relative;width:1200px;height:900px;min-width:min-content;min-height:min-content;transform-origin:top left}
.sbe-plan-stage img,.sbe-plan-stage canvas{position:absolute;inset:0;width:100%;height:100%}
.sbe-plan-stage img{object-fit:fill;background:rgba(0,0,0,.2);display:block}
.sbe-plan-stage canvas{z-index:2;cursor:crosshair}
.sbe-plan-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:24px;z-index:3;background:linear-gradient(135deg,rgba(0,0,0,.55),rgba(0,0,0,.15))}
.sbe-plan-preview-card{padding:16px;border-radius:18px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);display:flex;flex-direction:column;gap:12px}
.sbe-plan-preview-frame{min-height:220px;border-radius:14px;overflow:hidden;background:rgba(0,0,0,.18)}
.sbe-plan-preview-frame iframe,.sbe-plan-preview-frame img{width:100%;height:100%;min-height:220px;border:0;display:block;object-fit:contain}
.sbe-plan-totals,.sbe-plan-shapes{display:flex;flex-direction:column;gap:10px}
.sbe-plan-total-row,.sbe-plan-shape-item{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
.sbe-plan-shape-item strong,.sbe-plan-total-row strong{color:var(--sbe-heading)}
.sbe-plan-shape-item small{display:block;opacity:.72}
.sbe-plan-status{display:inline-flex;align-items:center;min-height:38px}
@media (max-width: 960px){
  .sbe-plan-layout{grid-template-columns:1fr}
  .sbe-plan-stage{min-height:420px;max-height:65vh}
}

.sbe-check{display:flex;align-items:center;gap:.65rem;min-height:46px;padding:.75rem .9rem;border:1px solid var(--sbe-border-strong);border-radius:14px;background:rgba(255,255,255,.04);color:var(--sbe-text)}
.sbe-check input{width:auto;min-height:0;margin:0}
.sbe-plan-helper-copy{margin:0;color:var(--sbe-muted)}
.sbe-plan-fill-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
@media (max-width:720px){.sbe-plan-fill-actions{grid-template-columns:1fr}}

.sbe-plan-zoom-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding-top:4px}
.sbe-plan-zoom-readout{display:inline-flex;align-items:center;justify-content:center;min-width:72px;padding:.45rem .7rem;border:1px solid rgba(255,255,255,.12);border-radius:999px;background:rgba(255,255,255,.04);color:var(--sbe-heading)}
