/* The Cost of an Employee page.
 *
 * The shell, the title section, the folded how-to, the side menu grid, the
 * fact bar and the floating panel all come from the shared stylesheets this
 * page links. Only the shapes this page adds are written here: the bar that
 * splits an hour into wage and everything else, the three employer cards, the
 * lines of the bill and the dated history.
 */

.ce-block {
  background: var(--bm-white);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius);
  box-shadow: var(--bm-shadow);
  padding: 1.25rem 1.4rem;
  margin: 0 0 1.25rem;
}
.ce-block h2 {
  font-family: var(--bm-mono);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.7rem;
  color: var(--bm-accent);
}
.ce-block p { line-height: 1.65; }
.ce-block-lede { margin: 0 0 1.1rem; color: var(--bm-muted); font-size: 0.95rem; }
.ce-note { margin: 1rem 0 0; color: var(--bm-light); font-size: 0.85rem; line-height: 1.6; }
.ce-source { margin: 0.9rem 0 0; color: var(--bm-light); font-size: 0.8rem; line-height: 1.6; }
.ce-source a { color: var(--bm-accent); }

/* ---- what one hour really costs ---- */

.ce-price { border-left: 4px solid var(--bm-accent); }
.ce-headline {
  font-family: var(--bm-mono);
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.05;
}
.ce-per {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--bm-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ce-split {
  display: flex;
  margin: 1.1rem 0 0.8rem;
  border-radius: var(--bm-radius);
  overflow: hidden;
  border: 1px solid var(--bm-border);
}
.ce-split div {
  padding: 0.55rem 0.7rem;
  font-family: var(--bm-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
}
.ce-split-wage { background: #0284c7; color: #ffffff; }
.ce-split-rest { background: var(--bm-subtle); color: var(--bm-text); }
.ce-point { margin: 0; font-weight: 600; }

/* ---- the same hour, three kinds of employer ---- */

.ce-kinds { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.1rem; }
.ce-kind {
  flex: 1 1 13rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-start;
  text-align: left;
  background: var(--bm-subtle);
  border: 1px solid var(--bm-border);
  border-top: 3px solid var(--bm-border-dark);
  border-radius: var(--bm-radius);
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  color: var(--bm-text);
  font-family: inherit;
}
.ce-kind:hover { border-color: var(--bm-accent); }
/* The chosen card used to turn the same white as the block behind it, which
 * made it vanish at exactly the moment it mattered most. It keeps its own
 * background and is marked instead by a ring in the accent colour, so it is
 * tellable apart from its neighbours and from the block in both themes. */
.ce-kind.is-on {
  border-top-color: var(--bm-accent);
  box-shadow: inset 0 0 0 2px var(--bm-accent);
}
.ce-kind-rate { font-family: var(--bm-mono); font-size: 1.3rem; font-weight: 700; }
.ce-kind strong { font-size: 0.9rem; }
.ce-kind-split { font-size: 0.78rem; color: var(--bm-light); }
.ce-kind-name {
  font-family: var(--bm-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bm-light);
  margin: 0 0 0.3rem;
}

/* ---- the whole bill ---- */

.ce-lines { display: grid; gap: 0.8rem; }
.ce-line {
  background: var(--bm-subtle);
  border: 1px solid var(--bm-border);
  border-left: 3px solid var(--bm-border-dark);
  border-radius: var(--bm-radius);
  padding: 0.9rem 1rem;
}
.ce-line-wage { border-left-color: #0284c7; }
.ce-line-benefit { border-left-color: #16a34a; }
.ce-line-required { border-left-color: #d97706; }
.ce-line-cost {
  font-family: var(--bm-mono);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.ce-line-share {
  font-family: var(--bm-font);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--bm-light);
}
.ce-line h3 {
  font-family: var(--bm-mono);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0.25rem 0 0.45rem;
}
.ce-line p { margin: 0; font-size: 0.92rem; }
.ce-within { margin: 0.7rem 0 0; }
.ce-within summary { cursor: pointer; font-size: 0.84rem; }
.ce-within ul { margin: 0.5rem 0 0; padding: 0; list-style: none; }
.ce-within li {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.3rem 0;
  border-top: 1px solid var(--bm-border);
  font-size: 0.86rem;
}
.ce-within li:first-child { border-top: none; }
.ce-within li span:last-child { font-family: var(--bm-mono); white-space: nowrap; }

/* ---- the four charges the law requires ---- */

.ce-rates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0.9rem;
}
.ce-rate {
  background: var(--bm-subtle);
  border: 1px solid var(--bm-border);
  border-top: 3px solid #d97706;
  border-radius: var(--bm-radius);
  padding: 0.9rem 1rem;
}
.ce-rate-figure {
  font-family: var(--bm-mono);
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}
.ce-rate h3 {
  font-family: var(--bm-mono);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0.3rem 0 0.2rem;
}
.ce-terms { margin: 0; }
.ce-terms dt {
  font-family: var(--bm-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bm-light);
  margin: 0.6rem 0 0.15rem;
}
.ce-terms dd { margin: 0; font-size: 0.88rem; line-height: 1.6; color: var(--bm-muted); }

/* ---- the dated history ---- */

.ce-juncture {
  border-top: 1px solid var(--bm-border);
  padding: 1.1rem 0 0;
  margin: 1.1rem 0 0;
}
.ce-juncture:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.ce-juncture-date {
  font-family: var(--bm-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bm-light);
  margin: 0;
}
.ce-juncture h3 { margin: 0.25rem 0 0.6rem; font-size: 1.02rem; }
.ce-juncture ul { margin: 0 0 0.7rem; padding-left: 1.1rem; }
.ce-juncture li { font-size: 0.9rem; line-height: 1.6; color: var(--bm-muted); }
.ce-juncture p { margin: 0 0 0.5rem; font-size: 0.93rem; }
.ce-juncture-end { color: var(--bm-muted); }

/* ---- the folded notes the family's pages end with ---- */

.ce-notes {
  background: var(--bm-white);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius);
  padding: 0.9rem 1.2rem;
  margin: 0 0 1rem;
}
.ce-notes summary { cursor: pointer; }
.ce-notes ul { margin: 0.8rem 0 0; padding-left: 1.1rem; }
.ce-notes li { margin: 0 0 0.6rem; line-height: 1.65; color: var(--bm-muted); font-size: 0.92rem; }
.ce-notes dl { margin: 0.8rem 0 0; }
.ce-notes dt { margin: 0.8rem 0 0.2rem; font-size: 0.9rem; font-weight: 600; }
.ce-notes dt:first-child { margin-top: 0; }
.ce-notes dt a { color: var(--bm-accent); }
.ce-notes dd { margin: 0; font-size: 0.86rem; line-height: 1.6; color: var(--bm-muted); }

@media (max-width: 640px) {
  .ce-headline { font-size: 2rem; }
  .ce-split { flex-direction: column; }
}
