/* ============================================================
   guide.css — flagship long-form guide components
   (/how-to-clear-upsc). Loaded after landing.css + subpage.css;
   reuses their tokens (Fraunces/Inter, saffron/navy, cream).
   ============================================================ */

/* ---- AEO direct-answer box ---- */
.answer-box {
  margin-top: clamp(24px, 3.5vw, 36px); padding: clamp(20px, 3vw, 28px) clamp(22px, 3.4vw, 34px);
  border-left: 4px solid var(--saffron); border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: linear-gradient(135deg, rgba(226,103,15,0.06), rgba(17,43,76,0.04));
}
.answer-box > b { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--saffron); margin-bottom: 10px; }
.answer-box p { font-family: var(--serif); font-weight: 400; font-size: clamp(1.08rem, 1.8vw, 1.3rem); line-height: 1.58; color: var(--ink); margin: 0; }

/* ---- Brutal-math stat strip ---- */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: clamp(26px, 4vw, 40px); }
.stat { padding: 20px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.08; color: var(--navy); }
.stat--hot b { color: var(--saffron); }
.stat span { display: block; margin-top: 7px; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.45; }

/* ---- Marks map (where the 2025 marks live) ---- */
.marks { margin-top: clamp(24px, 4vw, 38px); display: flex; flex-direction: column; gap: 13px; }
.marks__row { display: grid; grid-template-columns: minmax(128px, 200px) 1fr 64px; align-items: center; gap: 12px; }
.marks__label { font-size: 0.92rem; font-weight: 500; color: var(--ink); }
.marks__label small { display: block; font-weight: 400; font-size: 0.76rem; color: var(--muted); }
.marks__bar { height: 26px; border-radius: 8px; background: var(--bg-tint); position: relative; overflow: hidden; }
.marks__bar i { position: absolute; inset: 0 auto 0 0; width: var(--v, 40%); border-radius: 8px; background: var(--grad); opacity: 0.92; }
.marks__bar--soft i { background: var(--navy-2); opacity: 0.55; }
.marks__val { font-family: var(--serif); font-size: 1.02rem; color: var(--navy); text-align: right; }
.marks__note { margin-top: 14px; font-size: 0.9rem; color: var(--ink-soft); font-style: italic; }

/* ---- Trap cards (the anti-guide) ---- */
.traps { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; margin-top: clamp(26px, 4vw, 42px); }
.trap { padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--shadow-sm); position: relative; }
.trap__n { position: absolute; top: 16px; right: 18px; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 1.6rem; color: rgba(226,103,15,0.35); }
.trap h3 { font-family: var(--serif); font-weight: 500; font-size: 1.16rem; letter-spacing: -0.01em; margin-bottom: 8px; padding-right: 34px; }
.trap p { color: var(--ink-soft); font-size: 0.94rem; line-height: 1.56; }
.trap__fix { margin-top: 12px; padding: 10px 13px; border-left: 3px solid #2F6D57; background: rgba(47,109,87,0.06); border-radius: 0 10px 10px 0; font-size: 0.9rem; color: var(--ink); }
.trap__fix b { color: #2F6D57; }

/* ---- Daily loop ---- */
.loop { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: clamp(24px, 4vw, 38px); }
.loop__step { flex: 1 1 150px; min-width: 148px; padding: 16px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--shadow-sm); position: relative; }
.loop__step em { display: block; font-style: normal; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--saffron); margin-bottom: 7px; }
.loop__step b { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.02rem; margin-bottom: 5px; }
.loop__step span { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.45; }

/* ---- Roadmap phases (accordion) ---- */
.phases { margin-top: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 12px; }
.phase { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--shadow-sm); overflow: hidden; }
.phase > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 14px; padding: 17px 20px; }
.phase > summary::-webkit-details-marker { display: none; }
.phase__tag { flex-shrink: 0; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--navy); padding: 6px 11px; border-radius: 100px; }
.phase[open] .phase__tag { background: var(--saffron); }
.phase__title { font-family: var(--serif); font-weight: 500; font-size: 1.12rem; letter-spacing: -0.01em; }
.phase__sub { margin-left: auto; font-size: 0.8rem; color: var(--muted); flex-shrink: 0; }
.phase__body { padding: 4px 20px 20px; border-top: 1px solid var(--line-soft); }
.phase__body p { color: var(--ink-soft); font-size: 0.96rem; line-height: 1.6; margin: 12px 0; }
.phase__body ul { margin: 10px 0 4px; padding: 0; }
.phase__body li { list-style: none; padding: 8px 0 8px 26px; position: relative; color: var(--ink-soft); font-size: 0.94rem; line-height: 1.5; border-bottom: 1px solid var(--line-soft); }
.phase__body li:last-child { border-bottom: none; }
.phase__body li::before { content: "→"; position: absolute; left: 2px; color: var(--saffron); font-weight: 700; }
.phase__body li b { color: var(--ink); font-weight: 600; }

/* ---- Progress checklist (remembers you) ---- */
.checkwrap { margin-top: clamp(24px, 4vw, 38px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); box-shadow: var(--shadow-md); overflow: hidden; }
.checkwrap__head { padding: 18px 22px 16px; border-bottom: 1px solid var(--line-soft); background: rgba(17,43,76,0.02); }
.checkwrap__head b { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.checkwrap__meta { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.checkwrap__count { font-size: 0.82rem; color: var(--ink-soft); white-space: nowrap; }
.checkbar { flex: 1; height: 8px; border-radius: 100px; background: var(--line); overflow: hidden; }
.checkbar i { display: block; height: 100%; width: 0%; border-radius: 100px; background: var(--grad); transition: width .5s var(--ease); }
.checklist { padding: 8px 10px 12px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 11px 12px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.check:hover { background: var(--bg-tint); }
.check input { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 21px; height: 21px; margin-top: 1px; border: 2px solid rgba(22,25,31,0.28); border-radius: 7px; cursor: pointer; position: relative; transition: all .2s; }
.check input:checked { background: var(--saffron); border-color: var(--saffron); }
.check input:checked::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 0.8rem; font-weight: 700; }
.check div b { display: block; font-weight: 500; font-size: 0.95rem; color: var(--ink); }
.check div span { font-size: 0.8rem; color: var(--muted); }
.check input:checked ~ div b { text-decoration: line-through; color: var(--muted); }
.checkwrap__foot { padding: 10px 22px 16px; font-size: 0.8rem; color: var(--muted); font-style: italic; }

/* ---- Subject yield rows ---- */
.yield { margin-top: clamp(24px, 4vw, 38px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--shadow-sm); overflow: hidden; }
.yield__row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr auto; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.yield__row:last-child { border-bottom: none; }
.yield__row > b { font-weight: 500; font-size: 0.95rem; }
.yield__row > span { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.45; }
.yield__chip { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 11px; border-radius: 100px; white-space: nowrap; }
.yield__chip--high { background: rgba(226,103,15,0.12); color: var(--saffron); }
.yield__chip--med { background: rgba(17,43,76,0.08); color: var(--navy); }

@media (max-width: 640px) {
  .marks__row { grid-template-columns: minmax(104px, 130px) 1fr 52px; gap: 8px; }
  .phase__sub { display: none; }
  .yield__row { grid-template-columns: 1fr auto; }
  .yield__row > span { grid-column: 1 / -1; }
}

/* ---- On-this-page TOC ---- */
.toc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: clamp(20px, 3vw, 28px); }
.toc > b { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.toc a { font-size: 0.82rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; padding: 7px 13px; border: 1px solid var(--line); border-radius: 100px; background: var(--bg-2); transition: all .25s var(--ease); }
.toc a:hover { color: var(--saffron); border-color: rgba(226,103,15,0.4); transform: translateY(-1px); }

/* ---- 60-second trap test ---- */
.traptest { margin-top: clamp(22px, 3.4vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); box-shadow: var(--shadow-md); overflow: hidden; }
.traptest__head { padding: 16px 20px 14px; border-bottom: 1px solid var(--line-soft); background: rgba(226,103,15,0.04); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.traptest__head b { font-family: var(--serif); font-weight: 500; font-size: 1.12rem; }
.traptest__head span { font-size: 0.84rem; color: var(--muted); }
.traptest__body { padding: 8px 10px; }
.tt-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: background .2s; font-size: 0.94rem; color: var(--ink); line-height: 1.5; }
.tt-row:hover { background: var(--bg-tint); }
.tt-row input { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; border: 2px solid rgba(22,25,31,0.28); border-radius: 6px; cursor: pointer; position: relative; transition: all .2s; }
.tt-row input:checked { background: var(--navy); border-color: var(--navy); }
.tt-row input:checked::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 0.75rem; font-weight: 700; }
.traptest__verdict { margin: 6px 16px 16px; padding: 13px 16px; border-left: 3px solid var(--saffron); background: rgba(226,103,15,0.05); border-radius: 0 10px 10px 0; font-size: 0.94rem; color: var(--ink); line-height: 1.6; }
.traptest__verdict a { color: var(--saffron); font-weight: 600; }

/* ---- Share row ---- */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: clamp(20px, 3vw, 28px); }
.share-row > span { font-size: 0.9rem; color: var(--ink-soft); }
.share-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--ink); text-decoration: none; padding: 9px 16px; border: 1px solid var(--line); border-radius: 100px; background: var(--bg-2); cursor: pointer; transition: all .25s var(--ease); font-family: var(--sans); }
.share-chip:hover { border-color: rgba(226,103,15,0.45); color: var(--saffron); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
