/* ---------- Responsibilities at each stage: the parts of the work as a flow, then who does each with this service
   (Views/Shared/_Responsibility.cshtml, on the four service pages; was on /services.html until 16/11) ---------- */
/* The title wraps evenly here although the service pages break their titles as in their designs (service-page.css):
   this section has no design of its own, and its titles differ per page */
.ssw-page > .resp-sec .sec-title {
  text-wrap: balance;
}
.resp {
  --resp-desol: #00c2cb;
  --resp-you: #fedd59;
  --resp-pad: 1.4rem;
}
.resp-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem 2.4rem;
  margin-bottom: 2.4rem;
  font-size: var(--fs-small);
  font-weight: 700;
  color: #0e2a38;
}
.resp-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}
.resp-swatch {
  width: 2.4rem;
  height: 1.4rem;
  border-radius: 0.5rem;
  background: var(--resp-fill);
}
.resp-swatch--d,
.resp-cell--d {
  --resp-fill: var(--resp-desol);
}
.resp-swatch--y,
.resp-cell--y {
  --resp-fill: var(--resp-you);
}
/* Together: the two colours meet at a hard stop, never blended */
.resp-swatch--b,
.resp-cell--b {
  --resp-fill: linear-gradient(90deg, var(--resp-desol) 0 50%, var(--resp-you) 50% 100%);
}
.resp-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.resp-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: stretch;
}
/* The flow: five arrows, the first flat at its tail, each over its part (inset by the block's padding and border) */
.resp-row--head {
  align-items: center;
  margin-bottom: 0.4rem;
  padding: 0 calc(var(--resp-pad) + 1px);
}
.resp-step {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 5rem;
  padding: 0.8rem 2rem 0.8rem 2.4rem;
  background: #d4eff1;
  font-size: var(--fs-small);
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  color: #0e2a38;
  clip-path: polygon(0 0, calc(100% - 1.4rem) 0, 100% 50%, calc(100% - 1.4rem) 100%, 0 100%, 1.4rem 50%);
}
.resp-step:first-child {
  padding-left: 1.6rem;
  border-radius: 1.2rem 0 0 1.2rem;
  clip-path: polygon(0 0, calc(100% - 1.4rem) 0, 100% 50%, calc(100% - 1.4rem) 100%, 0 100%);
}
/* The service's five parts: one white block */
.resp-block {
  padding: var(--resp-pad);
  border: 1px solid #d4eff1;
  border-radius: 2rem;
  background: #ffffff;
  box-shadow: 0 2rem 4rem -3.6rem rgba(14, 42, 56, 0.5);
}
/* A part of the work: one solid shape in the colour of who does it, its words and its detail on white panels inside, so no
   pale line can show around the rounded corners. A stripe of the colour shows above the words, the border in the same colour */
.resp-cell {
  --resp-cell-inner: calc(1.2rem - 1.5px);
  display: flex;
  flex-direction: column;
  border: 1.5px solid transparent;
  border-radius: 1.2rem;
  background: var(--resp-fill) border-box;
}
/* A dashed line parts the title from its detail; the two white panels overlap, so at fractional screen scales no line of
   colour shows between them */
.resp-cell__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0.55rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px dashed #d4eff1;
  border-radius: 0.5rem 0.5rem 0 0;
  background: #ffffff;
  box-shadow: 0 1px 0 #ffffff;
  font-size: var(--fs-small);
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  color: #0e2a38;
}
.resp-cell__who {
  display: none;
}
/* Step names and titles wrap evenly, never one word alone on their last line (as h1–h3 in main.css); details wrap as written */
.resp-cell__label {
  text-wrap: balance;
}
.resp-cell__detail {
  flex: 1 1 auto;
  padding: 1rem 1.2rem 1.2rem;
  border-radius: 0 0 var(--resp-cell-inner) var(--resp-cell-inner);
  background: #ffffff;
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.5;
  color: #0e2a38;
}
/* The five titles share one height and the five details another: each cell spans the row's two tracks */
@media (min-width: 768px) {
  .resp-block .resp-cell {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
}
/* Phones: no flow; the parts one per line, each under its name */
@media (max-width: 767px) {
  .resp-legend {
    justify-content: flex-start;
    margin-bottom: 1.6rem;
  }
  .resp-row--head {
    display: none;
  }
  .resp-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }
  .resp-cell__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.2rem 1rem;
  }
  /* The step: small, grey and spaced, so it reads as a caption; who does it: a badge in its colour; the title: large and dark */
  .resp-cell__head::before {
    content: attr(data-step);
    grid-column: 1;
    align-self: center;
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5a7380;
  }
  html[lang=ja] .resp-cell__head::before {
    letter-spacing: 0.04em;
  }
  .resp-cell__who {
    display: block;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    padding: 0.2rem 0.9rem;
    border-radius: 999px;
    background: var(--resp-fill);
    font-size: var(--fs-label);
    font-weight: 800;
    line-height: 1.5;
    color: #0e2a38;
  }
  .resp-cell__label--owner {
    display: none;
  }
  .resp-cell__label {
    grid-column: 1 / -1;
    margin-top: 0.4rem;
    font-size: var(--fs-body);
    font-weight: 800;
    line-height: 1.35;
    color: #0e2a38;
  }
}
/* Who does a part, as a badge: text on solid cyan is white; "Together" is a white badge in a cyan-and-yellow border, so its
   words never sit on either colour */
.resp-cell--d .resp-cell__who {
  color: #ffffff;
}
.resp-cell--b .resp-cell__who {
  border: 1.5px solid transparent;
  background: linear-gradient(#ffffff, #ffffff) padding-box, var(--resp-fill) border-box;
}
