/* Sheldon article — scoped visual components (.sh-*) */
/* Visual vocabulary: blue = the adapted model, grey = the base model, red = a failure. */

:root {
  --sh-ink: #1a1a1a;
  --sh-body: #3c3c46;
  --sh-muted: #71717d;
  --sh-hair: #e7e7ec;
  --sh-accent: #0a5ad4;
  --sh-accent-soft: #eaf1fd;
  --sh-bad: #b4232a;
  --sh-track: #efeff4;
  --sh-grey: #c0c1ca;
}

.sh-fig {
  margin: 2.2rem 0;
}

.sh-fig figcaption {
  font-size: 0.85rem;
  color: var(--sh-muted);
  text-align: center;
  margin-top: 0.9rem;
  line-height: 1.5;
}

/* ---- two answers side by side ---- */
.sh-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.sh-answer {
  border: 1px solid var(--sh-hair);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  background: #fff;
}

.sh-answer.hot {
  border-color: var(--sh-accent);
}

.sh-answer h4 {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--sh-ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sh-answer.hot h4 { color: var(--sh-accent); }

.sh-answer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sh-answer li {
  display: flex;
  gap: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 0.55rem;
  color: var(--sh-body);
}

.sh-answer li:last-child { margin-bottom: 0; }
.sh-answer .ok { color: var(--sh-accent); font-weight: 700; }
.sh-answer .miss { color: var(--sh-bad); font-weight: 700; }

/* ---- six-stage chain ---- */
.sh-chain {
  display: flex;
  align-items: stretch;
}

.sh-chain .st {
  flex: 1;
  text-align: center;
  border: 1px solid var(--sh-hair);
  background: #fff;
  padding: 0.7rem 0.2rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sh-body);
}

.sh-chain .st + .st { border-left: none; }
.sh-chain .st:first-child { border-radius: 10px 0 0 10px; }
.sh-chain .st:last-child { border-radius: 0 10px 10px 0; }

.sh-chain .st .n {
  display: block;
  font-size: 0.68rem;
  color: var(--sh-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.sh-chain .st.hot {
  background: var(--sh-accent);
  border-color: var(--sh-accent);
  color: #fff;
}

.sh-chain .st.hot .n { color: rgba(255, 255, 255, 0.75); }

/* ---- 2x2 result cards ---- */
.sh-grid4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.sh-cell {
  border: 1px solid var(--sh-hair);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: #fff;
}

.sh-cell .lbl {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sh-muted);
  margin-bottom: 0.4rem;
}

.sh-cell .val {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sh-ink);
  font-variant-numeric: tabular-nums;
}

.sh-cell .val small {
  font-size: 0.95rem;
  color: var(--sh-muted);
  font-weight: 500;
}

.sh-cell .det {
  font-size: 0.8rem;
  color: var(--sh-muted);
  margin-top: 0.25rem;
}

.sh-cell.hot {
  border-color: var(--sh-accent);
  background: var(--sh-accent-soft);
}

.sh-cell.hot .val, .sh-cell.hot .lbl { color: var(--sh-accent); }

/* ---- simple bars ---- */
.sh-bars { display: flex; flex-direction: column; gap: 0.8rem; }

.sh-bar {
  display: grid;
  grid-template-columns: 7.5rem 1fr 4.2rem;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.sh-bar .name { text-align: right; font-weight: 600; color: var(--sh-body); }

.sh-bar .track {
  background: var(--sh-track);
  border-radius: 5px;
  height: 1.5rem;
  position: relative;
  overflow: hidden;
}

.sh-bar .fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 5px;
  background: var(--sh-grey);
}

.sh-bar .fill.hot { background: var(--sh-accent); }

.sh-bar .v {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--sh-ink);
}

.sh-bar .v.hot { color: var(--sh-accent); }

.sh-annot {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sh-accent);
  margin-top: 1rem;
}

/* ---- big number statement ---- */
.sh-statement {
  text-align: center;
  padding: 2rem 1rem;
  border: 1px solid var(--sh-hair);
  border-radius: 14px;
  background: #fff;
}

.sh-statement .big {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--sh-ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.sh-statement .big span { color: var(--sh-accent); }

.sh-statement .sub {
  font-size: 0.9rem;
  color: var(--sh-muted);
  margin-top: 0.6rem;
}

/* ---- seven-model paired bars ---- */
.sh-legend {
  display: flex;
  gap: 1.4rem;
  font-size: 0.8rem;
  color: var(--sh-muted);
  margin-bottom: 1rem;
  justify-content: center;
}

.sh-legend i {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 3px;
  margin-right: 0.4rem;
  vertical-align: -1px;
}

.sh-legend .a i { background: var(--sh-accent); }
.sh-legend .u i { background: var(--sh-grey); }

.sh-pair {
  display: grid;
  grid-template-columns: 7.5rem 1fr 5.4rem;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
}

.sh-pair .name { text-align: right; font-weight: 600; color: var(--sh-body); }
.sh-pair .tracks { display: flex; flex-direction: column; gap: 3px; }

.sh-pair .t {
  height: 0.6rem;
  border-radius: 3px;
  background: var(--sh-track);
  position: relative;
  overflow: hidden;
}

.sh-pair .f {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
}

.sh-pair .f.a { background: var(--sh-accent); }
.sh-pair .f.u { background: var(--sh-grey); }

.sh-pair .v {
  font-variant-numeric: tabular-nums;
  color: var(--sh-muted);
  font-size: 0.82rem;
}

.sh-pair .v b { color: var(--sh-ink); }

/* ---- four habits ---- */
.sh-habits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.sh-habit {
  border: 1px solid var(--sh-hair);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: #fff;
}

.sh-habit h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sh-ink);
  margin: 0 0 0.35rem;
}

.sh-habit p {
  font-size: 0.85rem;
  color: var(--sh-muted);
  margin: 0;
  line-height: 1.5;
}

/* ---- onboarding flow ---- */
.sh-flow {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.sh-flow .fb {
  flex: 1;
  border: 1px solid var(--sh-hair);
  border-radius: 10px;
  background: #fff;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sh-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sh-flow .fb small {
  display: block;
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--sh-muted);
  margin-top: 0.25rem;
}

.sh-flow .fb.hot {
  background: var(--sh-accent);
  border-color: var(--sh-accent);
  color: #fff;
}

.sh-flow .fb.hot small { color: rgba(255, 255, 255, 0.8); }

.sh-flow .arr {
  color: var(--sh-grey);
  align-self: center;
  font-size: 1rem;
  flex: none;
}

/* ---- guess callout ---- */
.sh-guess {
  border-left: 3px solid var(--sh-accent);
  background: var(--sh-accent-soft);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  color: var(--sh-ink);
  margin: 2rem 0;
}

/* ---- mobile ---- */
@media (max-width: 560px) {
  .sh-answers, .sh-grid4, .sh-habits { grid-template-columns: 1fr; }

  .sh-bar { grid-template-columns: 5.2rem 1fr 3.6rem; font-size: 0.8rem; }
  .sh-pair { grid-template-columns: 5.2rem 1fr 4.6rem; font-size: 0.75rem; }

  .sh-chain { flex-wrap: wrap; }
  .sh-chain .st { flex: 1 1 33%; border-radius: 0 !important; border-left: 1px solid var(--sh-hair); }
  .sh-chain .st.hot { border-color: var(--sh-accent); }

  .sh-flow { flex-direction: column; }
  .sh-flow .arr { transform: rotate(90deg); }

  .sh-statement .big { font-size: 2rem; }
}
