/* ============================================================
   loom/custom.css — page-specific CSS for Loom Studio only.
   Never touched by scripts/sync-shared-sites.sh. Shared design-
   system CSS lives in base.css (packages/shared-styles).
   ============================================================ */

/* loom (and invern) render .usecase-pain as display:block; nablr and the
   shared baseline don't set this. Not universal enough to promote to
   base.css, so kept as a page-local supplement to the shared rule. */
.usecase-pain { display: block; }

/* ---------- Problem: stat bars (replaces flat metric tiles for % figures) ---------- */
.stat-bars { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; margin-bottom: 0.5rem; }

.stat-bar-card {
  background: var(--card-bg);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-card);
  padding: 1rem 1.2rem;
}

.stat-bar-row + .stat-bar-row { margin-top: 0.9rem; }

.stat-bar-top { display: flex; align-items: baseline; justify-content: space-between; }

.stat-bar-value { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--text-primary); }

.stat-bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--border-default);
  opacity: 0.45;
  margin: 0.45rem 0 0.4rem;
  overflow: hidden;
}

.stat-bar-fill { height: 100%; border-radius: 3px; background: var(--interactive); }

.stat-bar-label { font-size: 0.75rem; color: var(--text-muted); }

.stat-callout {
  background: var(--card-bg);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-card);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.stat-callout-value { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--text-primary); }
.stat-callout-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.4rem; }

@media (max-width: 720px) {
  .stat-bars { grid-template-columns: 1fr; }
}

/* ---------- Industries: icon grid (replaces table for verticals) ---------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.industry-card {
  background: var(--card-bg);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-card);
  padding: 1.1rem 0.8rem;
  text-align: center;
}

.industry-name { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 0.4rem; }
.industry-cases { display: block; font-size: 0.72rem; line-height: 1.4; color: var(--text-muted); }

@media (max-width: 900px) {
  .industry-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ---------- Compare: 2-axis positioning plot (replaces 3 flat cards) ---------- */
.compare-plot {
  position: relative;
  height: 340px;
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-card);
  background:
    linear-gradient(var(--border-default) 1px, transparent 1px) 0 50% / 100% 1px no-repeat,
    linear-gradient(90deg, var(--border-default) 1px, transparent 1px) 50% 0 / 1px 100% no-repeat,
    var(--card-bg);
  background-blend-mode: normal;
  opacity: 1;
  margin-bottom: 1rem;
  padding: 1.25rem;
}

.compare-axis-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.compare-axis-label.x-low { left: 1.25rem; bottom: 0.6rem; }
.compare-axis-label.x-high { right: 1.25rem; bottom: 0.6rem; }
.compare-axis-label.y-high { left: 1.25rem; top: 0.6rem; }
.compare-axis-label.y-low { left: 1.25rem; bottom: 2rem; }

.compare-point { position: absolute; transform: translate(-50%, -50%); text-align: center; width: 150px; }

.compare-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin: 0 auto 0.45rem;
  background: var(--border-default);
  border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 1px var(--border-default);
}

.compare-point.is-loom .compare-dot { background: var(--cta); box-shadow: 0 0 0 4px rgba(28, 46, 69, 0.12); }

.compare-label { display: block; font-weight: 700; font-size: 0.85rem; color: var(--text-primary); }
.compare-sub { display: block; font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }

@media (max-width: 640px) {
  .compare-plot { height: auto; padding: 1.5rem 1rem 2.5rem; }
  .compare-point { position: static; transform: none; width: auto; margin-bottom: 1.25rem; }
  .compare-axis-label { display: none; }
}

/* ---------- Output: feature tabs + split panel (light section, dark mockup) ---------- */
.feature-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.feature-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  border: var(--border-width) solid var(--border-default);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.feature-tab svg { width: 1.05rem; height: 1.05rem; flex-shrink: 0; }

.feature-tab:hover { border-color: var(--interactive); }

.feature-tab.active {
  background: var(--cta);
  border-color: var(--cta);
  color: #F2EDE4;
}

.feature-panel { display: none; }
.feature-panel.open {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.feature-panel-left {
  background: var(--card-bg);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.9rem;
}

.feature-panel-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--interactive);
  margin-bottom: 0.5rem;
}

.feature-panel-title {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
}

.feature-checklist { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }

.feature-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.feature-checklist svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--success-text);
}

.feature-panel-right {
  background: #0D1620;
  border: 1px solid rgba(242, 237, 228, 0.1);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.6rem;
  font-family: var(--font-mono);
}

.mockup-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.9rem;
  margin-bottom: 0.2rem;
  border-bottom: var(--border-width) solid rgba(242, 237, 228, 0.14);
}

.mockup-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(242, 237, 228, 0.5);
}

.mockup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: var(--border-width) solid rgba(242, 237, 228, 0.08);
  font-size: 0.8rem;
}

.mockup-row:last-of-type { border-bottom: none; }

.mockup-name { color: rgba(242, 237, 228, 0.85); }

.mockup-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.mockup-tag-ok { background: rgba(125, 217, 150, 0.14); color: #7DD996; }
.mockup-tag-pending { background: rgba(232, 184, 75, 0.14); color: #E8B84B; }
.mockup-tag-running { background: rgba(125, 144, 160, 0.16); color: #9BADBD; }

.mockup-stat {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: var(--border-width) solid rgba(242, 237, 228, 0.14);
}

.mockup-stat-value { font-size: 1.5rem; font-weight: 700; color: #F2EDE4; }
.mockup-stat-label { font-size: 0.72rem; color: rgba(242, 237, 228, 0.5); font-family: var(--font-body); }

@media (max-width: 700px) {
  .feature-panel.open { grid-template-columns: 1fr; }
  .feature-tab { padding: 0.45rem 0.85rem; font-size: 0.8rem; }
}

/* band-dark usecase-card treatment: identical to invern's copy, but not
   promoted to base.css since nablr doesn't use usecase-card inside a
   band-dark section — kept page-local rather than shared-but-unused. */
.band-dark .usecase-card {
  background: rgba(242, 237, 228, 0.05);
  border-color: rgba(242, 237, 228, 0.18);
}
.band-dark .usecase-name { color: #F2EDE4; }
.band-dark .usecase-pain { color: rgba(242, 237, 228, 0.65); }
.band-dark .usecase-icon { color: #9BADBD; }

/* ---------- Architecture stack (accordion + diamond nav) ---------- */
.stack-wrap {
  display: grid;
  grid-template-columns: 140px 1fr;
  column-gap: 2.5rem;
  row-gap: 0;
  align-items: start;
  justify-items: center;
}

.stack-wrap .stack-row { justify-self: stretch; }

.stack-diamond {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: rgba(242, 237, 228, 0.06);
  border: 1px solid rgba(242, 237, 228, 0.25);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.stack-diamond span {
  transform: rotate(-45deg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(242, 237, 228, 0.55);
}

.stack-diamond.active {
  background: var(--interactive);
  border-color: var(--interactive);
}

.stack-diamond.active span {
  color: #1C2E45;
  font-weight: 700;
}

.stack-row { border-bottom: var(--border-width) solid rgba(242, 237, 228, 0.14); }
.stack-row:last-child { border-bottom: none; }

.stack-row-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 1.1rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #F2EDE4;
}

.stack-row-head .stack-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #7D90A0;
  width: 1.4rem;
  flex-shrink: 0;
}

.stack-row-head svg:not(.chev) {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  color: #9BADBD;
}

.stack-row-head .chev {
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  flex-shrink: 0;
  color: #7D90A0;
  transition: transform 0.2s ease;
}

.stack-row.open .chev { transform: rotate(180deg); }

.stack-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.stack-row.open .stack-panel { max-height: 140px; }

.stack-panel p {
  padding: 0 0 1.1rem 2.9rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(242, 237, 228, 0.65);
}

@media (max-width: 700px) {
  .stack-wrap { grid-template-columns: 1fr; }
  .stack-diamond { display: none; }
}

.usecase-grid.two-col { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 480px) {
  .usecase-grid.two-col { grid-template-columns: 1fr; }
}

/* ---------- Compliance badge strip ---------- */
.badge-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  margin: 2rem 0 2.25rem;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 120px;
  text-align: center;
}

.badge-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(242, 237, 228, 0.35);
  flex-shrink: 0;
}

.badge-ring svg { width: 24px; height: 24px; color: #F2EDE4; }

.badge-item.progress .badge-ring { border-style: dashed; border-color: rgba(242, 237, 228, 0.3); }
.badge-item.progress .badge-ring svg { color: #9BADBD; }

.badge-label { font-size: 0.78rem; font-weight: 600; color: #F2EDE4; }
.badge-item.progress .badge-label { color: #9BADBD; }

.badge-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7DD996;
}
.badge-item.progress .badge-tag { color: #E8B84B; }

/* ---------- Builder timeline ---------- */
.timeline { display: flex; flex-direction: column; }

.timeline-row { display: flex; gap: 1.25rem; }

.timeline-node-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.timeline-node {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1.5px solid var(--interactive);
  color: var(--interactive);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-line {
  width: 1px;
  flex: 1;
  min-height: 20px;
  margin: 4px 0;
  background: var(--border-default);
}

.timeline-content { padding-bottom: 1.75rem; }
.timeline-row:last-child .timeline-content { padding-bottom: 0; }

.timeline-content .usecase-name {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 0.3rem;
}

.timeline-content .usecase-pain { font-size: 0.85rem; color: var(--text-muted); }
