/* ── Home page — unofficial ribbon, hero, journey bar, matrix, resources ── */

/* ---------- unofficial ribbon ---------- */
.unofficial-ribbon {
  background: #fff7e6;
  border: 1px solid #f0d089;
  border-radius: .6rem;
  color: #5a4a1a;
  font-size: .8rem;
  text-align: center;
  padding: .45rem 1rem;
  margin-bottom: 2rem;
}
[data-md-color-scheme="slate"] .unofficial-ribbon {
  background: #2c2716;
  border-color: #5a4d22;
  color: #c8b87a;
}

/* ---------- hero ---------- */
.home-eyebrow {
  display: block;
  color: var(--md-primary-fg-color);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .4rem;
}

.home-hero h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: .2rem 0 .55rem;
}

.home-lede {
  font-size: 1.02rem;
  color: var(--md-default-fg-color--light);
  max-width: none;
  margin: 0 0 1.6rem;
}

.home-credibility {
  font-size: .86rem;
  color: var(--md-default-fg-color--light);
  border-left: 3px solid var(--md-primary-fg-color);
  padding: .1rem 0 .1rem .75rem;
  margin: -0.6rem 0 1.6rem;
}

/* ---------- journey bar ---------- */
.journey {
  display: flex;
  align-items: stretch;
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .75rem;
  padding: .5rem .35rem;
  box-shadow: 0 1px 2px rgba(20,30,50,.06), 0 6px 18px rgba(20,30,50,.06);
  margin: 0 0 1.8rem;
  flex-wrap: nowrap;
  gap: 0;
  text-decoration: none;
  overflow-x: auto;
}

.journey .step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 1.45rem .6rem .8rem;
  border-radius: .55rem;
  text-decoration: none;
  color: var(--md-default-fg-color);
  transition: background .15s;
  position: relative;
}
.journey .step:hover {
  background: var(--md-code-bg-color);
  text-decoration: none;
}

.journey .arrow {
  align-self: center;
  color: var(--md-default-fg-color--lighter);
  font-size: 1rem;
  line-height: 1;
  padding: 0 .05rem;
  flex: 0 0 auto;
}

.journey .step .n {
  font-size: .62rem;
  color: var(--md-default-fg-color--lighter);
  font-weight: 700;
  margin-bottom: .15rem;
  letter-spacing: .02em;
}
.journey .step .t {
  font-weight: 700;
  font-size: .82rem;
  margin: .1rem 0 .2rem;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.journey .step .d {
  font-size: .7rem;
  color: var(--md-default-fg-color--lighter);
  line-height: 1.35;
}

/* On narrow viewports keep the row intact via horizontal scroll
   instead of wrapping Stage 7 to a new line. */
@media (max-width: 900px) {
  .journey .step { flex: 0 0 9.5rem; }
}

.journey .step.dest .t {
  color: var(--md-primary-fg-color);
}
.journey .step.dest::after {
  content: "destination";
  position: absolute;
  top: .5rem;
  right: .65rem;
  font-size: .55rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--md-primary-fg-color);
  background: color-mix(in srgb, var(--md-primary-fg-color) 12%, transparent);
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 700;
}

.journey .step.pioneer .t {
  color: #b26a00;
}
.journey .step.pioneer::after {
  content: "pioneer";
  position: absolute;
  top: .5rem;
  right: .65rem;
  font-size: .55rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #b26a00;
  background: color-mix(in srgb, #b26a00 14%, transparent);
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 700;
}

.journey .step.foundation::after {
  content: "foundation";
  position: absolute;
  top: .5rem;
  right: .65rem;
  font-size: .55rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4a5566;
  background: color-mix(in srgb, #4a5566 10%, transparent);
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 700;
}

.journey-legend {
  margin: .85rem 0 0;
  font-size: .8rem;
  line-height: 1.6;
  color: var(--md-default-fg-color--light);
}
.journey-legend .jl-row {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin: 0 0 .3rem;
}
.journey-legend .jl-row:last-child {
  margin-bottom: 0;
}
.journey-legend .jl-badge {
  flex: 0 0 auto;
  display: inline-block;
  min-width: 5.5rem;
  text-align: center;
  font-size: .55rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 700;
}
.journey-legend .jl-text {
  flex: 1 1 auto;
}
.journey-legend .jl-foundation {
  color: #4a5566;
  background: color-mix(in srgb, #4a5566 10%, transparent);
}
.journey-legend .jl-pioneer {
  color: #b26a00;
  background: color-mix(in srgb, #b26a00 14%, transparent);
}
.journey-legend .jl-dest {
  color: var(--md-primary-fg-color);
  background: color-mix(in srgb, var(--md-primary-fg-color) 12%, transparent);
}

  align-self: center;
  color: var(--md-default-fg-color--lightest);
  font-size: 1.1rem;
  padding: 0 2px;
  flex-shrink: 0;
}

/* ---------- audience callout ---------- */
.audience {
  color: var(--md-default-fg-color--light);
  font-size: .875rem;
  border-left: 3px solid var(--md-default-fg-color--lightest);
  padding-left: .85rem;
  margin: 0 0 .5rem;
}

/* ---------- role × stage matrix ---------- */
.matrix-wrap {
  overflow-x: auto;
  margin: .5rem 0 .5rem;
  -webkit-overflow-scrolling: touch;
}

table.home-matrix {
  border-collapse: collapse;
  width: 100%;
  min-width: 540px;
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,30,50,.06), 0 6px 18px rgba(20,30,50,.06);
}

table.home-matrix th,
table.home-matrix td {
  padding: .55rem .5rem;
  text-align: center;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  font-size: .8rem;
  vertical-align: middle;
}

table.home-matrix thead th {
  background: var(--md-code-bg-color);
  font-weight: 700;
  vertical-align: bottom;
}
table.home-matrix thead th.corner {
  text-align: left;
  font-size: .7rem;
  color: var(--md-default-fg-color--lighter);
  text-transform: uppercase;
  letter-spacing: .05em;
}
table.home-matrix thead th a {
  color: var(--md-primary-fg-color);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.25;
}
table.home-matrix thead th a:hover { text-decoration: underline; }
table.home-matrix thead th .stagenum {
  display: block;
  font-size: .6rem;
  color: var(--md-default-fg-color--lighter);
  font-weight: 700;
  letter-spacing: .04em;
}

table.home-matrix tbody th {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  font-size: .8rem;
  background: var(--md-default-bg-color);
  padding: 0;
}
table.home-matrix tbody th a {
  display: block;
  padding: .65rem .55rem;
  color: var(--md-primary-fg-color);
  text-decoration: none;
  font-weight: 700;
}
table.home-matrix tbody th a::after {
  content: "→";
  margin-left: .35em;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  display: inline-block;
}
table.home-matrix tbody th a:hover,
table.home-matrix tbody th a:focus-visible {
  text-decoration: underline;
  background: color-mix(in srgb, var(--md-primary-fg-color) 6%, transparent);
}
table.home-matrix tbody th a:hover::after,
table.home-matrix tbody th a:focus-visible::after {
  opacity: .8;
  transform: translateX(2px);
}
table.home-matrix tbody tr:last-child th,
table.home-matrix tbody tr:last-child td { border-bottom: 0; }

/* heatmap cells — graduated fill by intensity */
table.home-matrix tbody td { transition: background .15s; }
table.home-matrix td.lvl3 { background: color-mix(in srgb, var(--md-primary-fg-color) 16%, transparent); }
table.home-matrix td.lvl2 { background: color-mix(in srgb, var(--md-primary-fg-color) 8%, transparent); }
table.home-matrix td.lvl1 { background: color-mix(in srgb, var(--md-primary-fg-color) 3%, transparent); }
table.home-matrix td.lvl0 { background: transparent; }
table.home-matrix tbody tr:hover td { background: color-mix(in srgb, var(--md-primary-fg-color) 5%, var(--md-code-bg-color)); }
table.home-matrix tbody tr:hover td.lvl3 { background: color-mix(in srgb, var(--md-primary-fg-color) 22%, transparent); }
table.home-matrix tbody tr:hover td.lvl2 { background: color-mix(in srgb, var(--md-primary-fg-color) 13%, transparent); }

/* signal-bar meter — filled segments show intensity */
.meter {
  display: inline-flex;
  gap: 3px;
  align-items: flex-end;
  height: 18px;
  vertical-align: middle;
}
.meter i {
  width: 6px;
  border-radius: 2px;
  background: var(--md-default-fg-color--lightest);
  display: block;
}
.meter i:nth-child(1) { height: 9px; }
.meter i:nth-child(2) { height: 13px; }
.meter i:nth-child(3) { height: 18px; }
.home-matrix td.lvl1 .meter i:nth-child(-n+1),
.meter.lvl1 i:nth-child(-n+1) { background: var(--md-primary-fg-color); }
.home-matrix td.lvl2 .meter i:nth-child(-n+2),
.meter.lvl2 i:nth-child(-n+2) { background: var(--md-primary-fg-color); }
.home-matrix td.lvl3 .meter i,
.meter.lvl3 i { background: var(--md-primary-fg-color); }

/* ---------- matrix key ---------- */
.matrix-key {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: .78rem;
  color: var(--md-default-fg-color--lighter);
  margin: .6rem 0 1.6rem;
}
.matrix-key > span { display: inline-flex; align-items: center; gap: .45rem; }

/* ---------- resources section ---------- */
.home-resources {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .75rem;
  padding: 1.2rem 1.3rem 1.5rem;
  box-shadow: 0 1px 2px rgba(20,30,50,.06), 0 6px 18px rgba(20,30,50,.06);
  margin: 1.8rem 0 0;
}
.home-resources .res-heading {
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--lighter);
  font-weight: 700;
  margin: 0 0 .25rem;
}
.home-resources .res-sub {
  font-size: .82rem;
  color: var(--md-default-fg-color--light);
  margin: 0 0 .9rem;
  max-width: 70ch;
}

.reslist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .65rem;
}

.reslink {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .55rem;
  padding: .7rem .85rem;
  transition: border-color .15s, transform .15s;
}
.reslink:hover {
  border-color: var(--md-primary-fg-color);
  transform: translateY(-1px);
  text-decoration: none;
}
.reslink .rt {
  font-size: .83rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  display: flex;
  gap: .4rem;
  align-items: baseline;
}
.reslink .rd {
  font-size: .75rem;
  color: var(--md-default-fg-color--light);
  margin-top: .2rem;
  line-height: 1.4;
}
.reslink .src {
  font-size: .65rem;
  color: var(--md-default-fg-color--lighter);
  margin-top: .35rem;
  letter-spacing: .04em;
  font-weight: 600;
  text-transform: uppercase;
}

.res-rule {
  font-size: .78rem;
  color: var(--md-default-fg-color--lighter);
  margin: .9rem 0 0;
  padding-top: .65rem;
  border-top: 1px dashed var(--md-default-fg-color--lightest);
}

/* ---------- choose-your-path persona strip ---------- */
.path-eyebrow {
  display: block;
  color: var(--md-primary-fg-color);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 .35rem;
}
.path-intro {
  font-size: .9rem;
  color: var(--md-default-fg-color--light);
  margin: 0 0 1rem;
  max-width: none;
}
.path-intro a {
  color: var(--md-primary-fg-color);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.path-intro a:hover { text-decoration: underline; }

.path-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .7rem;
  margin: 0 0 1.8rem;
}
@media (max-width: 1100px) {
  .path-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .path-strip { grid-template-columns: repeat(2, 1fr); }
}

.path-card {
  display: flex;
  flex-direction: column;
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .7rem;
  padding: .9rem .95rem 1rem;
  box-shadow: 0 1px 2px rgba(20,30,50,.06), 0 6px 18px rgba(20,30,50,.06);
  transition: border-color .15s, transform .15s;
}
.path-card:hover {
  border-color: var(--md-primary-fg-color);
  transform: translateY(-2px);
}
.path-card .pc-role {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--lighter);
  margin-bottom: .3rem;
}
.path-card .pc-line {
  font-size: .8rem;
  color: var(--md-default-fg-color--light);
  line-height: 1.45;
  margin: 0 0 .7rem;
  flex: 1 1 auto;
}
.path-card .pc-cta {
  font-size: .82rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  text-decoration: none;
  line-height: 1.3;
}
.path-card .pc-cta:hover { text-decoration: underline; }
.path-card .pc-2nd {
  font-size: .74rem;
  font-weight: 600;
  color: var(--md-default-fg-color--light);
  text-decoration: none;
  margin-top: .4rem;
  line-height: 1.3;
}
.path-card .pc-2nd:hover { color: var(--md-primary-fg-color); text-decoration: underline; }

/* ---------- page feedback widget ("Was this page helpful?") ---------- */
.page-feedback {
  margin-top: 2.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}
.page-feedback .pf-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}
.page-feedback .pf-q {
  font-size: .82rem;
  font-weight: 700;
  color: var(--md-default-fg-color--light);
}
.page-feedback .pf-btns {
  display: inline-flex;
  gap: .5rem;
}
.page-feedback .pf-btn {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--md-default-fg-color--light);
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 2rem;
  padding: .3rem .9rem;
  line-height: 1.4;
  transition: border-color .15s, color .15s, background .15s, transform .1s;
}
.page-feedback .pf-btn:hover {
  border-color: var(--md-primary-fg-color);
  color: var(--md-primary-fg-color);
  background: color-mix(in srgb, var(--md-primary-fg-color) 7%, transparent);
}
.page-feedback .pf-btn:active { transform: translateY(1px); }
.page-feedback .pf-thanks {
  font-size: .8rem;
  color: var(--md-default-fg-color--light);
  margin: .35rem 0 0;
}
.page-feedback .pf-thanks a {
  color: var(--md-primary-fg-color);
  text-decoration: none;
  font-weight: 600;
}
.page-feedback .pf-thanks a:hover { text-decoration: underline; }

.page-foot-links {
  margin-top: 1.1rem;
}
.page-foot-links p {
  font-size: .72rem;
  color: var(--md-default-fg-color--light);
  margin: 0;
}
.page-foot-links a { color: var(--md-primary-fg-color); }
.page-feedback + .page-foot-links {
  margin-top: .85rem;
  padding-top: .65rem;
  border-top: 1px dashed var(--md-default-fg-color--lightest);
}
