/* ---- Home why (#problem) ---- */
/* Four bottlenecks as alternating rows: copy on one side, a layered glass scene on the other (departures board, team ring
   with the watchdog, PR #1847 under three reviews, three sandboxes beside a locked production). A coloured light sits
   behind each scene for the glass to refract. The markup is each scene's finished state; home-why.js plays them on the
   shared clock while they are on screen. Layout applies in both themes; the tokens carry the dark colours. */
/* the glows reach past the wrap; clip them at the viewport edge without making the section a scroll box */
html.da-home #problem {
  overflow-x: clip;
}
html.da-home #problem .phead {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px;
  align-items: end;
  max-width: none;
  margin-block-end: 52px;
}
html.da-home #problem .phead h2 {
  margin: 0;
}
html.da-home #problem .phead .lead {
  max-width: 34em;
}
html.da-home #problem .prows {
  margin: 0;
  padding: 0;
  list-style: none;
}
html.da-home #problem .prow {
  --sc-s: 43%;
  --sc-e: 0%;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  gap: 64px;
  align-items: center;
  padding-block: 48px;
}
html.da-home #problem .prow::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset-block: -8%;
  inset-inline: calc(var(--sc-s) - 10%) calc(var(--sc-e) - 10%);
  background: radial-gradient(30% 36% at var(--ax) var(--ay), rgba(31, 111, 209, var(--bl-a)), transparent 70%),
    radial-gradient(28% 34% at var(--bx) var(--by), rgba(0, 197, 232, var(--cy-a)), transparent 70%),
    radial-gradient(18% 24% at var(--cx) var(--cy), rgba(255, 170, 110, var(--wm-a)), transparent 70%);
}
html.da-home #problem .prow:nth-child(1) {
  grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
  --ax: 24%;
  --ay: 66%;
  --bx: 76%;
  --by: 30%;
  --cx: 58%;
  --cy: 76%;
}
html.da-home #problem .prow:nth-child(2) {
  grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
  --sc-s: 0%;
  --sc-e: 58%;
  --ax: 72%;
  --ay: 32%;
  --bx: 26%;
  --by: 70%;
  --cx: 36%;
  --cy: 26%;
}
html.da-home #problem .prow:nth-child(3) {
  --ax: 74%;
  --ay: 70%;
  --bx: 24%;
  --by: 32%;
  --cx: 48%;
  --cy: 24%;
}
html.da-home #problem .prow:nth-child(4) {
  grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
  --sc-s: 0%;
  --sc-e: 48%;
  --ax: 30%;
  --ay: 30%;
  --bx: 70%;
  --by: 70%;
  --cx: 80%;
  --cy: 36%;
}
html.da-home #problem .prow:nth-child(even) .scene {
  order: -1;
}
html.da-home #problem .ptext {
  max-width: 34em;
}
html.da-home #problem .ptext h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}
html.da-home #problem .ptext p {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

/* the glass panel and its translucent inner tiles */
html.da-home #problem .scene {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: 260px;
  padding: 18px 20px;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  background: var(--sheen), linear-gradient(var(--glass), var(--glass)), var(--scene-tint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-hi), 0 0 0 1px var(--glass-edge), var(--glass-sh);
  font: 500 12.5px/1.3 var(--body);
  color: var(--muted);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html.da-home #problem .scene {
    background: var(--glass-fb);
  }
}
html.da-home #problem .tl,
html.da-home #problem .dep li,
html.da-home #problem .code,
html.da-home #problem .sb {
  border: 1px solid var(--in-line);
  background: var(--in-fill);
  box-shadow: 0 0 0 1px var(--in-ring), var(--in-sh);
}
html.da-home #problem .sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
html.da-home #problem .sh > span:first-child {
  color: var(--ink);
}
html.da-home #problem .scene .ok {
  color: var(--brand-ink);
}
html.da-home #problem .scene .warn {
  color: var(--del);
}

/* 1: overnight run, a timeline and a departures board */
html.da-home #problem .you {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html.da-home #problem .you i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-2);
}
html.da-home #problem .tl {
  position: relative;
  flex: none;
  height: 26px;
  border-radius: 6px;
}
html.da-home #problem .night {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 26.7%;
  width: 60%;
  border-inline: 1px dashed var(--brand-line);
  background: var(--brand-soft);
}
html.da-home #problem .tl .tick {
  position: absolute;
  top: 6px;
  width: 12px;
  height: 12px;
  margin-inline-start: -6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
html.da-home #problem .tl .tick.off {
  background: var(--line-2);
  box-shadow: none;
}
html.da-home #problem .cur {
  position: absolute;
  inset-block: -3px;
  width: 2px;
  margin-inline-start: -1px;
  background: var(--brand);
}
html.da-home #problem .tk {
  display: flex;
  justify-content: space-between;
  margin-block-start: -4px;
  font: 400 11px/1 var(--mono);
}
html.da-home #problem .dep-h,
html.da-home #problem .dep li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 10px;
  align-items: center;
}
html.da-home #problem .dep-h {
  padding: 0 10px;
  font: 500 10.5px/1 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
html.da-home #problem .dep {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
html.da-home #problem .dep li {
  padding: 7px 10px;
  border-radius: 6px;
  font: 500 12.5px/1.3 var(--body);
  color: var(--text);
}
html.da-home #problem .dep li > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.da-home #problem .dep li b {
  font: 500 12px/1.3 var(--mono);
  color: var(--ink);
}
html.da-home #problem .dep li > span:last-child {
  font-weight: 500;
  color: var(--brand-ink);
}
html.da-home #problem .dep li.ok > span:last-child {
  color: var(--green);
}
html.da-home #problem .dep li.hold > span:last-child {
  color: var(--gate-ink);
}

/* 2: six roles on a hexagon, the watchdog ring around them, the plane flying the ring */
html.da-home #problem .sc2 > :not(.team) {
  position: relative;
  z-index: 1;
}
html.da-home #problem .team {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  direction: ltr;
}
html.da-home #problem .team .wd {
  fill: none;
  stroke: var(--line-2);
  stroke-dasharray: 3 5;
  transform-box: fill-box;
  transform-origin: center;
}
html.da-home.motion #problem .team .wd {
  animation: why-sweep 30s linear infinite;
}
@keyframes why-sweep {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  html.da-home.motion #problem .team .wd {
    animation: none;
  }
}
html.da-home #problem .team .wdt {
  font: 500 10.5px var(--body);
  fill: var(--muted);
}
html.da-home #problem .team .hexl {
  fill: none;
  stroke: var(--line-2);
}
html.da-home #problem .tn circle {
  fill: var(--in-node);
  stroke: rgba(31, 111, 209, 0.22);
  stroke-width: 1.5;
}
html.da-home[data-theme="dark"] #problem .tn circle {
  stroke: rgba(255, 255, 255, 0.18);
}
html.da-home #problem .tn text {
  font: 600 9.5px var(--body);
  fill: var(--muted);
}
html.da-home #problem .tn.on circle {
  stroke: var(--brand);
}
html.da-home #problem .tn.on text {
  fill: var(--brand-ink);
}
html.da-home #problem .tn.cur circle {
  fill: var(--brand-btn);
  stroke: var(--brand-btn);
}
html.da-home #problem .tn.cur text {
  fill: #fff;
}
html.da-home #problem .team .tid {
  font: 500 9.5px var(--mono);
  fill: var(--brand-ink);
}
html.da-home #problem .team .role {
  font: 500 10.5px var(--body);
  fill: var(--muted);
}
html.da-home #problem .team .act {
  font: 500 15px var(--display);
  fill: var(--ink);
}
html.da-home #problem .team .tid,
html.da-home #problem .team .role,
html.da-home #problem .team .act {
  transition: opacity 0.2s ease;
}
html.da-home #problem .team .tplane {
  color: var(--brand-btn);
  fill: currentColor;
  filter: drop-shadow(0 1px 2px rgba(31, 111, 209, 0.45));
}

/* 3: a pull request, its three reviewers and the lines they flag and fix */
html.da-home #problem .rv {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 18px;
  margin-inline-start: 4px;
  border-radius: 5px;
  background: var(--brand-soft);
  font-size: 10px;
  font-weight: 600;
  color: var(--brand-ink);
  transition: opacity 0.25s ease;
}
html.da-home #problem .st3 {
  white-space: nowrap;
}
html.da-home #problem .code {
  margin: 0;
  padding: 6px 0;
  overflow: hidden;
  border-radius: 8px;
  list-style: none;
  counter-reset: ln;
  font: 400 11px/1.6 var(--mono);
  color: var(--text);
}
html.da-home #problem .code li {
  position: relative;
  padding-inline: 8px;
  white-space: pre;
  counter-increment: ln;
}
html.da-home #problem .code li::before {
  content: counter(ln);
  display: inline-block;
  width: 14px;
  color: var(--muted);
  opacity: 0.6;
}
html.da-home #problem .code i {
  margin-inline-end: 6px;
  font-style: normal;
  color: var(--muted);
}
html.da-home #problem .code em {
  display: none;
  position: absolute;
  inset-inline-end: 0;
  padding-inline: 8px 6px;
  font-style: normal;
}
html.da-home #problem .code .n {
  display: none;
}
html.da-home #problem .code .seen .okm {
  display: inline;
  color: var(--brand-ink);
}
html.da-home #problem .code .fl.flag {
  background: var(--del-soft);
}
html.da-home #problem .code .fl.flag em {
  display: inline;
  background: inherit;
  color: var(--del);
}
html.da-home #problem .code .fl.fixed {
  background: var(--brand-soft);
}
html.da-home #problem .code .fl.fixed .o {
  display: none;
}
html.da-home #problem .code .fl.fixed .n {
  display: inline;
}
html.da-home #problem .sf {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-block-start: auto;
}
html.da-home #problem .ck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html.da-home #problem .ck::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-2);
}
html.da-home #problem .ck.ok::before {
  background: var(--brand);
}

/* 4: three sandboxes filling with tests, production locked beside them */
html.da-home #problem .sbs {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 74px;
  gap: 8px;
}
html.da-home #problem .sb {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
}
html.da-home #problem .sb b {
  font: 500 11px/1.2 var(--mono);
  color: var(--ink);
}
html.da-home #problem .sb small,
html.da-home #problem .prod small {
  font-size: 11px;
}
html.da-home #problem .sb .bar {
  height: 5px;
  margin-block-start: auto;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}
html.da-home #problem .sb .bar i {
  display: block;
  height: 100%;
  background: var(--brand);
  transform: scaleX(var(--fill, 1));
  transform-origin: 0 50%;
}
html.da-home[dir="rtl"] #problem .sb .bar i {
  transform-origin: 100% 50%;
}
html.da-home #problem .sb em {
  font: 400 10.5px/1.2 var(--mono);
  font-style: normal;
}
html.da-home #problem .sb.ok em {
  color: var(--brand-ink);
}
html.da-home #problem .prod {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px dashed var(--in-ring);
  border-radius: 8px;
  background: var(--in-fill);
  text-align: center;
  color: var(--muted);
}
html.da-home #problem .prod svg {
  width: 18px;
  height: 18px;
}
html.da-home #problem .prod b {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 1080px) {
  html.da-home #problem .phead {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-block-end: 32px;
  }
  html.da-home #problem .prow,
  html.da-home #problem .prow:nth-child(n) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
  }
}
@media (max-width: 767px) {
  html.da-home #problem .prow,
  html.da-home #problem .prow:nth-child(n) {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-block: 32px;
  }
  html.da-home #problem .prow:nth-child(even) .scene {
    order: 0;
  }
  html.da-home #problem .prow::before {
    inset-block: calc(100% - 330px) -30px;
    inset-inline: -14px;
  }
  html.da-home #problem .scene {
    height: 250px;
    padding: 14px;
  }
  html.da-home #problem .dep-h,
  html.da-home #problem .dep li {
    grid-template-columns: 66px minmax(0, 1fr) minmax(0, 1.4fr);
  }
  html.da-home #problem .dep-h > :nth-child(2),
  html.da-home #problem .dep li > :nth-child(2) {
    display: none;
  }
}
