/* MSFI plain-words components
   Extends the existing tokens in /_astro/GuideCard.*.css (--paper, --ink, --forest, --green, --line, --lime, --amber, --serif, --sans).
   Components: .plain-box (explainer), .key-dates (timeline), .change-table (before/after), .know-ledger (confirmed / announced / waiting),
   .update-strip (homepage notice). */

:root {
  --pw-spine: #163b30;
  --pw-wash: #f0f2e8;
  --pw-ink-soft: #33433a;
  --pw-amber-wash: #f6eedb;
  --pw-amber-ink: #6e4a12;
  --pw-gone-wash: #efe9e4;
  --pw-gone-ink: #6b4c40;
}

/* ---------- In plain words: the explainer box ---------- */
.plain-box {
  position: relative;
  margin-block: 38px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--pw-spine);
  font-family: var(--sans);
}
.article-prose .plain-box p { color: var(--pw-ink-soft); }
.plain-box__head {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 26px 30px 0;
}
.plain-box__mark { width: 44px; height: 44px; grid-row: span 2; }
.plain-box__kicker {
  margin: 0 !important;
  color: var(--green) !important;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
}
.plain-box__title {
  margin: 2px 0 0 !important;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 450;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.plain-box__body { padding: 8px 30px 6px 90px; font-size: 16.5px; line-height: 1.85; }
.plain-box__body p { margin-block: 14px !important; }
.plain-box__body strong { color: var(--ink); }
.plain-box__body ul { margin-block: 12px !important; padding-left: 22px !important; }
.plain-box__answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  background: var(--pw-wash);
}
.plain-box__answers > div { padding: 18px 30px 20px; }
.plain-box__answers > div:nth-child(odd) { border-right: 1px solid var(--line); }
.plain-box__answers > div:nth-child(n+3) { border-top: 1px solid var(--line); }
.plain-box__answers dt {
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}
.plain-box__answers dd { margin: 5px 0 0; color: #3d4b42; font-size: 14.5px; line-height: 1.7; }
.plain-box--alert { border-left-color: #a67b31; }
.plain-box--alert .plain-box__kicker { color: var(--pw-amber-ink) !important; }

/* ---------- Key dates: a short timeline ---------- */
.key-dates { margin-block: 36px; font-family: var(--sans); }
.key-dates__title {
  margin: 0 0 14px !important;
  color: var(--forest) !important;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
}
.key-dates__list {
  --dot: 15px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr));
  gap: 18px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
.key-dates__list::before {
  content: "";
  position: absolute;
  top: calc(var(--dot) / 2 - 1px);
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #9fb48d, var(--forest));
}
.key-dates__list li {
  position: relative;
  margin: 0 !important;
  padding: calc(var(--dot) + 14px) 0 0 !important;
}
.key-dates__list li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--forest);
  box-sizing: border-box;
}
.key-dates__list li.is-past::before { background: #9fb48d; border-color: #9fb48d; }
.key-dates__list li.is-deadline::before {
  background: var(--amber);
  border-color: #a67b31;
  box-shadow: 0 0 0 5px rgba(223, 181, 108, 0.32);
}
.key-dates__list time {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.key-dates__list li.is-deadline time { color: var(--pw-amber-ink); }
.key-dates__list span { display: block; margin-top: 6px; color: #48594d; font-size: 14px; line-height: 1.6; }

/* ---------- Before and after: what changes ---------- */
.change-table-wrap { margin-block: 30px; border: 1px solid var(--line); background: var(--white); }
.change-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14px; line-height: 1.6; }
.change-table caption {
  padding: 18px 22px 14px;
  text-align: left;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
  border-bottom: 1px solid var(--line);
}
.change-table th {
  padding: 12px 18px;
  text-align: left;
  vertical-align: bottom;
  color: #274b37;
  background: #e8ebdf;
  font-size: 13px;
  font-weight: 750;
}
.change-table td { padding: 14px 18px; vertical-align: top; color: #3d4b42; border-top: 1px solid var(--line); }
.change-table td:first-child { color: var(--ink); font-weight: 700; width: 30%; }
.chip {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 9px 3px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  white-space: nowrap;
  text-decoration: none;
}
.chip--kept { color: var(--forest); background: #e3ebd2; }
.chip--new { color: var(--forest); background: var(--lime); }
.chip--cut { color: var(--pw-amber-ink); background: var(--pw-amber-wash); }
.chip--gone { color: var(--pw-gone-ink); background: var(--pw-gone-wash); }
.chip--wait { color: #44524a; background: #e9ebe4; }
.change-table__note { margin: 0 !important; padding: 12px 22px 16px; border-top: 1px solid var(--line); color: #59655d !important; font-size: 13px; line-height: 1.7; }

/* ---------- What we know: confirmed / announced / waiting ---------- */
.know-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 30px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--sans);
}
.know-ledger > div { padding: 20px 22px 18px; }
.know-ledger > div + div { border-left: 1px solid var(--line); }
.know-ledger h3 {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 10px !important;
  color: var(--forest);
  font-family: var(--sans) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}
.know-ledger h3::before {
  content: "";
  flex: 0 0 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--forest);
}
.know-ledger .is-announced h3::before { background: transparent; border: 2px solid var(--forest); box-sizing: border-box; }
.know-ledger .is-waiting h3::before { background: transparent; border: 2px dashed #8a948c; box-sizing: border-box; }
.know-ledger ul { margin: 0 !important; padding-left: 18px !important; }
.know-ledger li { margin-block: 7px !important; padding-left: 2px !important; color: #3d4b42; font-size: 14px; line-height: 1.6; }

/* ---------- Homepage update strip ---------- */
.update-strip { border-block: 1px solid #d9c79d; background: var(--pw-amber-wash); font-family: var(--sans); }
.update-strip__inner { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; padding-block: 14px; }
.update-strip__label { color: var(--pw-amber-ink); font-size: 13px; font-weight: 800; }
.update-strip p { margin: 0; color: #4a3d22; font-size: 14px; line-height: 1.6; }
.update-strip a { color: var(--forest); font-weight: 750; }

/* ---------- Focus, small screens, print ---------- */
.plain-box a:focus-visible, .update-strip a:focus-visible, .key-dates a:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

@media (width <= 640px) {
  .plain-box__head { grid-template-columns: 36px 1fr; padding: 22px 18px 0; column-gap: 12px; }
  .plain-box__mark { width: 36px; height: 36px; }
  .plain-box__title { font-size: 23px; }
  .plain-box__body { padding: 6px 18px 4px; font-size: 16px; }
  .plain-box__answers { grid-template-columns: 1fr; }
  .plain-box__answers > div { padding: 15px 18px 17px; }
  .plain-box__answers > div:nth-child(odd) { border-right: 0; }
  .plain-box__answers > div + div { border-top: 1px solid var(--line); }

  .key-dates__list { grid-template-columns: 1fr; gap: 20px; padding-left: 30px !important; }
  .key-dates__list::before { top: 4px; bottom: 4px; left: 6px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, #9fb48d, var(--forest)); }
  .key-dates__list li { padding: 0 !important; }
  .key-dates__list li::before { left: -30px; top: 4px; }

  .change-table caption { display: block; padding: 16px 18px 12px; font-size: 19px; }
  .change-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .change-table, .change-table tbody, .change-table tr, .change-table td { display: block; width: auto; }
  .change-table tr { border-top: 1px solid var(--line); padding: 6px 0 10px; }
  .change-table td { border: 0; padding: 6px 18px; }
  .change-table td:first-child { width: auto; padding-top: 12px; }
  .change-table td[data-label]::before { content: attr(data-label); display: block; color: #59655d; font-size: 12px; font-weight: 750; text-decoration: none; }

  .know-ledger { grid-template-columns: 1fr; }
  .know-ledger > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

@media print {
  .plain-box, .change-table-wrap, .know-ledger { break-inside: avoid; }
}
