/* Digital highlights wall: a clean light screen that rises out of the desk. */
.bw-wall {
  --bw-good: #1f4a2c;
  --bw-bad: #6b2230;
  --bw-ink: #1d2328;
  --bw-soft: #59636b;
  --bw-line: #d9dee2;
  position: absolute;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--bw-ink);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  user-select: text !important;
  -webkit-user-select: text;
  pointer-events: auto;
}
.bw-wall *, .bw-wall *::before, .bw-wall *::after { box-sizing: border-box; }
/* The slot clips only at the desk line, so the screen emerges from the desk while its glow stays visible. */
.bw-slot {
  position: absolute;
  inset: 0;
  clip-path: inset(-80px -80px 0 -80px);
  -webkit-clip-path: inset(-80px -80px 0 -80px);
}
.bw-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 6px 6px;
  background: linear-gradient(180deg, #fdfdfb 0%, #f5f6f3 100%);
  border: 1px solid rgba(150, 205, 235, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 0 26px rgba(120, 196, 240, 0.55),
    0 0 70px rgba(120, 196, 240, 0.28);
  overflow: hidden;
  transform: translate3d(0, 104%, 0);
  opacity: 0.2;
  transition: transform 1050ms cubic-bezier(0.2, 0.75, 0.15, 1), opacity 700ms ease-out;
}
.bw-wall.bw-up .bw-screen { transform: translate3d(0, 0, 0); opacity: 1; }
.bw-wall.bw-lowering .bw-screen { transition: transform 720ms cubic-bezier(0.55, 0, 0.75, 0.2), opacity 600ms ease-in 120ms; }
.bw-sheen {
  position: absolute;
  inset: -40% -10%;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 38%, rgba(190, 232, 255, 0.55) 50%, rgba(255, 255, 255, 0) 62%);
  transform: translateX(-70%);
  opacity: 0;
  z-index: 3;
}
.bw-wall.bw-up .bw-sheen { animation: bw-sheen 1500ms ease-out 450ms 1 both; }
@keyframes bw-sheen {
  0% { transform: translateX(-70%); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateX(70%); opacity: 0; }
}
/* Soft light where the wall meets the desk. */
.bw-seam {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -14px;
  height: 28px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(200, 238, 255, 0.95) 0%, rgba(130, 205, 245, 0.55) 35%, rgba(120, 196, 240, 0) 72%);
  opacity: 0;
  transform: scaleX(0.2);
  transition: opacity 500ms ease-out, transform 900ms cubic-bezier(0.2, 0.75, 0.15, 1);
}
.bw-wall.bw-rising .bw-seam { opacity: 1; transform: scaleX(1); }
.bw-wall.bw-up .bw-seam { opacity: 0.55; transition: opacity 1600ms ease-out 900ms, transform 900ms cubic-bezier(0.2, 0.75, 0.15, 1); }
.bw-wall.bw-lowering .bw-seam { opacity: 0.9; }

.bw-head {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 32px 18px;
  border-bottom: 1px solid var(--bw-line);
  background: rgba(255, 255, 255, 0.7);
}
.bw-eyebrow { margin: 0 0 4px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #3d7fa6; font-weight: 600; }
.bw-head h2 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; color: var(--bw-ink); font-family: inherit; }
.bw-stamp { margin: 6px 0 0; font-size: 13.5px; color: var(--bw-soft); }
.bw-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  border: 1px solid #c9d3da;
  background: #fff;
  color: var(--bw-ink);
  font: 600 15px/1 inherit;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.bw-close span { font-size: 22px; line-height: 1; font-weight: 400; margin-top: -2px; }
.bw-close em { font-style: normal; }
.bw-close:hover { background: #f1f6f9; }
.bw-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 26px 32px 36px;
  scrollbar-width: thin;
  scrollbar-color: #b9c4cc transparent;
}
.bw-sec + .bw-sec { margin-top: 34px; }
.bw-sec h3 {
  margin: 0 0 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bw-soft);
}
.bw-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.bw-kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--bw-line);
  min-width: 0;
}
.bw-kpi.hero { grid-column: 1 / -1; padding: 20px 22px; background: linear-gradient(180deg, #ffffff, #f7faf8); }
.bw-kpi .k { font-size: 13.5px; font-weight: 600; color: var(--bw-soft); }
.bw-kpi .v { font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; color: var(--bw-ink); white-space: nowrap; }
.bw-kpi.hero .v { font-size: 40px; }
.bw-kpi .n { font-size: 12.5px; line-height: 1.35; color: #7a848c; }
.bw-wall .good { color: var(--bw-good); }
.bw-wall .bad { color: var(--bw-bad); }
.bw-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.bw-chart {
  margin: 0;
  padding: 18px 20px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--bw-line);
  min-width: 0;
}
.bw-chart.wide { grid-column: 1 / -1; }
.bw-chart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.bw-chart figcaption .t { font-size: 17px; font-weight: 700; color: var(--bw-ink); }
.bw-chart figcaption .s { font-size: 14px; color: var(--bw-soft); }
.bw-chart figcaption .s b { font-weight: 700; }
.bw-chart figcaption .u { flex-basis: 100%; font-size: 12.5px; color: #7a848c; }
.bw-chart svg { display: block; overflow: visible; shape-rendering: geometricPrecision; max-width: 100%; height: auto; }
.bw-chart .g { stroke: #e6eaed; stroke-width: 1; }
.bw-chart .ax { stroke: #8e99a1; stroke-width: 1.2; }
.bw-chart .z { stroke: #5b666e; stroke-width: 1.1; stroke-dasharray: 4 4; }
.bw-chart .tk { font-size: 12px; fill: #59636b; font-family: inherit; }
.bw-chart .at { font-size: 12.5px; font-weight: 600; fill: #3a444b; font-family: inherit; }
.bw-chart .ln { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.bw-chart .ln.good { stroke: var(--bw-good); }
.bw-chart .ln.bad { stroke: var(--bw-bad); }
.bw-chart .ln.mkt { stroke: #8a949b; stroke-width: 2; stroke-dasharray: 6 4; }
.bw-chart .ln.mdl { stroke: #22516f; }
.bw-chart .wash { stroke: none; fill-opacity: 0.12; }
.bw-chart .wash.good { fill: var(--bw-good); }
.bw-chart .wash.bad { fill: var(--bw-bad); }
.bw-chart .dot { stroke: #fff; stroke-width: 2; }
.bw-chart .dot.good { fill: var(--bw-good); }
.bw-chart .dot.bad { fill: var(--bw-bad); }
.bw-chart .bar.good { fill: var(--bw-good); }
.bw-chart .bar.bad { fill: var(--bw-bad); }
.bw-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; font-size: 13px; color: var(--bw-soft); }
.bw-legend li { display: flex; align-items: center; gap: 7px; }
.bw-legend i { display: inline-block; width: 22px; height: 0; border-top: 2.4px solid currentColor; }
.bw-legend i.mkt { border-top: 2px dashed #8a949b; }
.bw-legend i.mdl { border-top-color: #22516f; }
.bw-legend i.good { border-top-color: var(--bw-good); }
.bw-legend i.bad { border-top-color: var(--bw-bad); }
.bw-legend i.sq { width: 12px; height: 12px; border: 0; border-radius: 2px; }
.bw-legend i.sq.good { background: var(--bw-good); }
.bw-legend i.sq.bad { background: var(--bw-bad); }
.bw-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bw-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--bw-line); font-size: 15px; }
.bw-list li span { color: var(--bw-soft); }
.bw-list li strong { font-size: 17px; }
.bw-empty, .bw-loading { margin: 18px 0; color: var(--bw-soft); font-size: 15px; }
.bw-foot { margin: 30px 0 0; font-size: 12.5px; color: #7a848c; line-height: 1.5; }

/* Phone: one column, generous spacing, nothing cramped. */
.bw-wall.bw-mobile .bw-screen { border-radius: 18px 18px 4px 4px; }
.bw-wall.bw-mobile .bw-head { padding: 18px 20px 14px; }
.bw-wall.bw-mobile .bw-head h2 { font-size: 22px; }
.bw-wall.bw-mobile .bw-stamp { font-size: 12.5px; }
.bw-wall.bw-mobile .bw-body { padding: 22px 20px 32px; }
.bw-wall.bw-mobile .bw-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bw-wall.bw-mobile .bw-kpi { padding: 14px 14px; }
.bw-wall.bw-mobile .bw-kpi .k { font-size: 13px; }
.bw-wall.bw-mobile .bw-kpi .v { font-size: 24px; }
.bw-wall.bw-mobile .bw-kpi.hero .v { font-size: 34px; }
.bw-wall.bw-mobile .bw-kpi .n { font-size: 12px; }
.bw-wall.bw-mobile .bw-charts { grid-template-columns: 1fr; gap: 18px; }
.bw-wall.bw-mobile .bw-chart { padding: 16px 16px 14px; }
.bw-wall.bw-mobile .bw-list { grid-template-columns: 1fr; gap: 10px; }
.bw-list li span, .bw-list li strong { white-space: nowrap; }
.bw-wall.bw-mobile .bw-list li { padding: 11px 13px; font-size: 14px; }
.bw-wall.bw-mobile .bw-list li strong { font-size: 15.5px; }

/* While the wall is up the parchment rests out of view behind it (layout untouched, so quill tracking is unaffected). */
.desk-scene .leaf { transition: opacity 500ms ease 250ms; }
html[data-wall="1"] .desk-scene .leaf { opacity: 0; transition: opacity 450ms ease 120ms; }
/* While the wall is up, the fixed ink pot copies step aside (layout kept so dip aim stays true). */
html[data-wall="1"] .inkpot { visibility: hidden !important; }
html[data-wall="1"] .desk-scene .colophon { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .bw-screen, .bw-seam { transition-duration: 1ms !important; }
  .bw-wall.bw-up .bw-sheen { animation: none; }
}
