.app-window { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #fff; }
.window-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px) minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--soft); }
.window-dots { display: flex; gap: 7px; }
.window-dots i { width: 11px; height: 11px; border-radius: 50%; background: #D5CCDF; }
.window-dots i:first-child { background: #F48FB1; }
.window-url { padding: 5px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: center; font-size: 13px; color: var(--muted); }
.window-bar .example-tag { justify-self: end; }
.window-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 440px; }
.window-tabs { display: grid; align-content: start; gap: 6px; padding: 22px 16px; border-right: 1px solid var(--line); }
.window-tabs > span { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-family: var(--font-heading); font-size: 14.5px; font-weight: 700; color: var(--ink-soft); }
.window-tabs > span i { padding: 2px 8px; border-radius: 999px; background: var(--soft); font-style: normal; font-size: 12.5px; color: var(--muted); }
.window-tabs > span.current { background: var(--aubergine); color: #fff; }
.window-tabs > span.current i { background: var(--magenta); color: #fff; }
.window-tabs .goal { margin-top: 14px; padding: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.45; color: var(--muted); }
.window-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-content: start; padding: 24px 26px; }
.panel h3 { margin-bottom: 12px; font-size: 15px; font-weight: 800; }
.panel h3.sub { margin: 22px 0 12px; }
.bars { display: grid; gap: 12px; }
.bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.bar-top b { font-family: var(--font-heading); font-size: 13.5px; }
.bar { height: 8px; margin-top: 6px; border-radius: 4px; overflow: hidden; background: var(--soft); }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--magenta); }
.bars.symptoms .bar i { background: var(--blue); }
.caption { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.top-three { display: grid; gap: 8px; }
.top-three li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--soft); font-size: 14.5px; line-height: 1.3; }
.top-three li b { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--aubergine); color: #fff; font: 800 13px/1 var(--font-heading); }
.top-three li i { font-style: normal; font-family: var(--font-heading); font-size: 13px; font-weight: 700; color: var(--mint-deep); }
.trace { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 14.5px; line-height: 1.4; }
.trace > p:first-child { font-style: italic; color: var(--ink-soft); }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks span { padding: 3px 8px; border-radius: 6px; background: var(--mint-soft); font-family: var(--font-heading); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mint-deep); }

@media (max-width: 1100px) {
  .window-body { grid-template-columns: minmax(0, 1fr); }
  .window-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--line); }
  .window-tabs .goal { display: none; }
}
@media (max-width: 720px) {
  .window-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .window-url { display: none; }
  .window-tabs { gap: 6px; padding: 12px; }
  .window-tabs > span { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 10px; font-size: 13px; }
  .window-main { grid-template-columns: minmax(0, 1fr); padding: 18px 14px; }
}
/* "Oplossingen" is the longest tab and has to fit a third of a 360 wide phone */
@media (max-width: 400px) {
  .window-tabs > span { padding: 8px 6px; font-size: 12px; }
}

/* The leader of the Top causes carries the crown; root-causes.js holds it back until the race has settled */
.bars.causes, .bars.causes > div:first-child { position: relative; }
.crown { position: absolute; right: 0; bottom: calc(100% + 6px); padding: 3px 8px; border-radius: 999px; background: var(--magenta); color: #fff; font: 700 11px/1.2 var(--font-heading); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.bars.causes.is-armed .crown { opacity: 0; transform: translateY(4px) scale(.9); }
.bars.causes.is-won .crown { transition: opacity .3s, transform .45s cubic-bezier(.3, 1.5, .5, 1); }
.bars.causes .bar i { transform-origin: left; }
.bars.causes.is-racing > div { transition: transform .5s cubic-bezier(.3, 1.2, .4, 1); }
