/* Chip Room Signal — homepage */

/* hero band: deep purple over the textured print backdrop */
.hero-band {
  background: var(--purple) url("/assets/img/hero-texture.jpg") center / cover no-repeat;
  color: var(--ivory);
  padding-block: var(--s6);
  border-bottom: 1px solid var(--line-purple);
}
.hero-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: var(--s5); align-items: start; }
.hero-copy .label { color: var(--gold); }
.hero-copy h1 { color: var(--ivory); max-width: 22ch; }
.hero-copy p { color: #ece5f6; font-size: 1.15rem; }
.hero-note { border-top: 1px solid var(--line-purple); padding-top: var(--s2); font-size: 0.95rem; color: #d8cdec; }
.hero-note strong { color: var(--gold); }
.hero-note a { color: var(--gold); }

.hero-stats { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s3); padding: 0; list-style: none; }
.hero-stats li { font-size: 0.9rem; color: #d8cdec; }
.hero-stats b { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--ivory); }

/* the "at a glance" hero panel */
.glance { background: var(--ivory); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: var(--s3); }
.glance h2 { font-size: 1.15rem; margin-bottom: var(--s2); }
.glance ol { list-style: none; margin: 0; padding: 0; }
.glance li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); padding: 9px 0; border-bottom: 1px solid var(--line); }
.glance li:last-child { border-bottom: 0; }
.glance .pct { font-family: var(--font-display); color: var(--purple); font-size: 1.05rem; white-space: nowrap; }
.glance-foot { font-size: 0.8rem; color: #6b5f52; margin: var(--s2) 0 0; }

/* body layout: content column + sticky side rail */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s6); padding-top: var(--s6); }
.rail { position: sticky; top: 56px; align-self: start; border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: var(--s3); background: var(--ivory-deep); }
.rail h2 { font-size: 1.05rem; }
.rail ul { list-style: none; padding: 0; margin: 0 0 var(--s3); }
.rail li { padding: 5px 0; }
.rail a { text-decoration: none; color: var(--purple); font-weight: 600; font-size: 0.95rem; }
.rail a:hover { color: var(--gold-ink); text-decoration: underline; }
.rail-safety { border-top: 1px solid var(--line); padding-top: var(--s2); font-size: 0.9rem; }

section { margin-bottom: var(--s6); }

/* affiliate disclosure strip near the showcase */
.disclosure-strip {
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  background: var(--ivory-deep);
  padding: var(--s2) var(--s3);
  font-size: 0.95rem;
  margin-bottom: var(--s4);
}
.disclosure-strip p { margin: 0; max-width: none; }

/* showcase cards: facts left, action panel right */
.card {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(200px, 1fr);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  background: #fbf8ef;
  margin-bottom: var(--s3);
}
.card-facts { padding: var(--s3); border-right: 1px solid var(--line); }
.card-facts img { height: 44px; width: auto; max-width: 170px; object-fit: contain; margin-bottom: var(--s2); }
.card-facts .badges { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s2) 0 0; padding: 0; list-style: none; }
.card-action { padding: var(--s3); display: flex; flex-direction: column; justify-content: center; gap: var(--s2); background: var(--ivory-deep); }
.card-score { font-family: var(--font-display); font-size: 2rem; color: var(--purple); line-height: 1; }
.card-score small { display: block; font-family: var(--font-body); font-size: 0.8rem; font-variant-caps: all-small-caps; letter-spacing: 0.1em; color: var(--gold-ink); margin-top: 4px; }
.card-offer { font-size: 0.9rem; margin: 0; max-width: none; }
.card-offer em { font-style: normal; color: #6b5f52; display: block; font-size: 0.8rem; }
.card-terms { font-size: 0.78rem; color: #6b5f52; margin: 0; max-width: none; }
.card-info { font-size: 0.92rem; }

.card.featured { border-left-width: 6px; }
.card.featured .card-facts { padding: var(--s4); }
.card.featured .card-facts img { height: 56px; max-width: 210px; }
.featured-tag { display: inline-block; font-variant-caps: all-small-caps; letter-spacing: 0.12em; font-weight: 700; color: var(--ivory); background: var(--purple); padding: 2px 10px; margin-bottom: var(--s2); }

/* staggered fade-in, enabled only when JS adds .js to <html> */
.js .card { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .card.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .card { opacity: 1; transform: none; transition: none; }
}

/* scorecards */
.score-intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr); gap: var(--s4); align-items: center; margin-bottom: var(--s4); }
.score-intro figure { margin: 0; border: 1px solid var(--line); }
.score-intro figcaption { font-size: 0.8rem; color: #6b5f52; padding: 6px 10px; border-top: 1px solid var(--line); }
.scorecard { border: 1px solid var(--line); margin-bottom: var(--s3); background: #fbf8ef; }
.scorecard summary { cursor: pointer; padding: var(--s2) var(--s3); display: flex; justify-content: space-between; align-items: center; gap: var(--s2); font-weight: 700; color: var(--purple); list-style: none; }
.scorecard summary::-webkit-details-marker { display: none; }
.scorecard summary::after { content: "+"; font-family: var(--font-display); font-size: 1.3rem; color: var(--gold-ink); }
.scorecard[open] summary::after { content: "\2212"; }
.scorecard summary .pct { font-family: var(--font-display); color: var(--gold-ink); }
.scorecard table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.scorecard th, .scorecard td { text-align: left; padding: 9px var(--s3); border-top: 1px solid var(--line); vertical-align: top; }
.scorecard th { width: 34%; font-variant-caps: all-small-caps; letter-spacing: 0.08em; font-weight: 600; color: var(--gold-ink); white-space: nowrap; }

/* methodology */
.method { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 1.5fr); gap: var(--s4); align-items: start; }
.method figure { margin: 0; border: 1px solid var(--line); }
.method ol { padding-left: 1.2em; }
.method li { margin-bottom: var(--s1); }

/* glossary */
.glossary dl { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s4); max-width: none; }
.glossary dt { font-weight: 700; color: var(--purple); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 6px; }
.glossary dd { margin: 0; font-size: 0.97rem; }

/* safety cards */
.safety-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s3); }
.safety-card { border: 1px solid var(--line); border-left: 4px solid var(--purple); background: #fbf8ef; padding: var(--s3); text-decoration: none; color: var(--ink); display: block; }
.safety-card:hover { border-left-color: var(--gold); color: var(--ink); }
.safety-card img { height: 40px; width: auto; max-width: 150px; object-fit: contain; margin-bottom: var(--s2); }
.safety-card strong { display: block; color: var(--purple); margin-bottom: 4px; }
.safety-card span { font-size: 0.9rem; }

/* FAQ: two mini-groups */
.faq-groups { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.faq-groups h3 { border-bottom: 1px solid var(--line); padding-bottom: var(--s1); }
.faq-groups dt { font-weight: 700; color: var(--purple); margin-top: var(--s3); }
.faq-groups dd { margin: var(--s1) 0 0; }

/* compact disclaimer */
.disclaimer { border-top: 1px solid var(--line); padding-top: var(--s3); font-size: 0.875rem; color: #5d5347; }
.disclaimer p { max-width: none; }

@media (max-width: 900px) {
  .hero-split, .layout, .score-intro, .method, .faq-groups, .glossary dl { grid-template-columns: 1fr; }
  .rail { position: static; order: -1; }
  .rail ul { columns: 2; }
}
@media (max-width: 640px) {
  .card, .card.featured { grid-template-columns: 1fr; }
  .card-facts { border-right: 0; border-bottom: 1px solid var(--line); }
  .rail ul { columns: 1; }
  .scorecard th { white-space: normal; width: 40%; }
}
