/* Shared look for /guides/* pages. Components: quick, tip, pills, chooser, cards (scorecards),
   mhead+strip (method headers), site (on-the-site panels with .ctl filter chips), setup, presets,
   flow/step/arrow, flips/flipline, tiles, quad, formula, chart (inline SVG), checks, details FAQ.
   Color a component with .c-craft/.c-gather/.c-farm/.c-ret/.c-flip/.c-maps/.c-gold (sets --c). */
:root {
  color-scheme: dark;
  --bg: #0f1216; --panel: #14181d; --panel2: #191e24; --line: #23282e;
  --text: #e6e8eb; --body: #d7dbe0; --muted: #9aa0a6; --gold: #c7b273; --link: #6fb1ff;
  --craft: #e0a85a; --gather: #6cc58a; --farm: #e07a6a; --ret: #a98be8; --flip: #6fb1ff; --maps: #5cc4c4;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
.wrap { max-width: 800px; margin: 0 auto; padding: 40px 16px 90px; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.back { display: inline-block; margin-bottom: 22px; }
h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); line-height: 1.2; margin: 0 0 10px; }
h2 { font-size: 1.4rem; color: var(--gold); margin: 52px 0 10px; line-height: 1.3; scroll-margin-top: 16px; }
h3 { font-size: 1.08rem; margin: 22px 0 6px; }
p, li { color: var(--body); }
p { margin: 10px 0; }
strong { color: #eef1f4; }
ul { padding-left: 22px; }
li { margin: 6px 0; }
.lead { font-size: 1.1rem; color: #cdd2d7; }
.updated { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.muted { color: var(--muted); font-size: .9rem; }
.caption { color: var(--muted); font-size: .85rem; text-align: center; margin: 6px 0 0; }
.quick { background: var(--panel); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 16px 0 6px; color: var(--text); font-size: 1.05rem; }
.quick strong { color: var(--gold); }
.tip { border-left: 3px solid var(--gold); background: var(--panel); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 18px 0; color: #cdd2d7; }
.cta { display: inline-block; margin: 14px 8px 14px 0; padding: 11px 20px; background: #1a73e8; color: #fff; border-radius: 8px; font-weight: 600; }
.cta:hover { text-decoration: none; filter: brightness(1.1); }
hr { border: none; border-top: 1px solid var(--line); margin: 44px 0; }
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* jump pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; padding: 0; list-style: none; }
.pills li { margin: 0; }
.pills a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--body); font-size: .9rem; }
.pills a:hover { border-color: var(--gold); color: var(--text); text-decoration: none; }
.pills .ico { width: 16px; height: 16px; }

/* chooser */
.chooser { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 16px 0; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--body); transition: border-color .15s, transform .15s; }
.choice:hover { text-decoration: none; border-color: var(--c); transform: translateY(-2px); }
.choice .badge { width: 40px; height: 40px; }
.choice q { display: block; quotes: none; color: var(--text); font-size: .95rem; line-height: 1.4; }
.choice span { display: block; margin-top: 4px; color: var(--c); font-weight: 700; font-size: .9rem; }
.badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); flex: none; }
.c-craft { --c: var(--craft); } .c-gather { --c: var(--gather); } .c-farm { --c: var(--farm); }
.c-ret { --c: var(--ret); } .c-flip { --c: var(--flip); } .c-maps { --c: var(--maps); } .c-gold { --c: var(--gold); }

/* scorecards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 18px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 10px; padding: 14px 16px; }
.card header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card header .badge { width: 36px; height: 36px; border-radius: 10px; }
.card header a { color: var(--text); font-weight: 700; }
.rate { font-size: 1.05rem; font-weight: 700; color: var(--c); margin: 0 0 8px; }
.stat { display: flex; justify-content: space-between; align-items: center; font-size: .86rem; color: var(--muted); margin: 4px 0; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 14px; height: 6px; border-radius: 3px; background: #2a3038; }
.d1 i:nth-child(-n+1), .d2 i:nth-child(-n+2), .d3 i:nth-child(-n+3), .d4 i:nth-child(-n+4), .d5 i:nth-child(-n+5) { background: var(--c); }
.needs { font-size: .84rem; color: var(--muted); margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); }
.card.live { --c: var(--gold); background: linear-gradient(160deg, #1d1a12, var(--panel)); display: flex; flex-direction: column; justify-content: center; }
.card.live p { margin: 6px 0; }

/* method section headers */
.mhead { display: flex; align-items: center; gap: 14px; margin: 52px 0 12px; }
.mhead h2 { margin: 0; }
.mhead .num { color: var(--muted); font-weight: 400; }
.strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.strip span { padding: 4px 10px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); font-size: .84rem; color: var(--body); }
.strip b { color: var(--c); font-weight: 700; }
.toollink { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 14px 0; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--body); }
.toollink:hover { text-decoration: none; border-color: var(--c); }
.toollink strong { display: block; color: var(--text); }
.toollink small { color: var(--muted); font-size: .86rem; }
.toollink .go { margin-left: auto; color: var(--c); font-weight: 700; white-space: nowrap; }
.more { font-size: .92rem; color: var(--muted); }

/* flow diagrams */
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin: 16px 0; padding: 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; }
.step { flex: 1 1 120px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 8px; border-radius: 10px; background: var(--panel); font-size: .88rem; line-height: 1.35; color: var(--body); }
.step b { color: var(--text); font-size: .95rem; }
.step .ico { color: var(--c); width: 28px; height: 28px; }
.step.result { background: color-mix(in srgb, var(--c) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.arrow { align-self: center; color: var(--muted); font-size: 1.3rem; }
.loopnote { flex-basis: 100%; text-align: center; color: var(--muted); font-size: .84rem; margin-top: 2px; }

.flips { display: grid; gap: 10px; margin: 16px 0; }
.flipline { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.flipline .end { text-align: center; padding: 8px; border-radius: 8px; background: var(--panel2); font-size: .9rem; }
.flipline .end b { display: block; color: var(--text); }
.flipline .end small { color: var(--muted); }
.flipline .mid { text-align: center; color: var(--flip); font-weight: 700; font-size: .82rem; line-height: 1.2; }
.flipline .mid svg { display: block; margin: 0 auto 2px; width: 64px; height: 14px; }
.flipdesc { grid-column: 1 / -1; font-size: .9rem; color: var(--body); margin: 0; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; margin: 16px 0; }
.tile { display: flex; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.tile .badge { width: 38px; height: 38px; border-radius: 10px; }
.tile p { margin: 0; font-size: .9rem; line-height: 1.5; }
.tile p > strong:first-child { display: block; font-size: .98rem; }

/* quadrant */
.quad { display: grid; grid-template-columns: 28px 1fr 1fr; grid-template-rows: 1fr 1fr auto; gap: 8px; margin: 18px 0 6px; }
.ylab { grid-row: 1 / 3; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; color: var(--muted); font-size: .85rem; letter-spacing: .04em; }
.xlab { grid-column: 2 / 4; text-align: center; color: var(--muted); font-size: .85rem; letter-spacing: .04em; }
.q { padding: 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: .88rem; line-height: 1.45; min-height: 120px; }
.q b { display: block; font-size: 1rem; margin-bottom: 4px; color: var(--text); }
.q.best { background: linear-gradient(150deg, #2a2413, var(--panel)); border-color: var(--gold); }
.q.best b { color: var(--gold); }
.q.trap b { color: var(--farm); }
.q.skip { opacity: .7; }
.formula { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 18px 0; padding: 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); font-weight: 700; }
.formula span { padding: 6px 12px; border-radius: 8px; background: var(--panel); }
.formula .op { background: none; color: var(--muted); padding: 0; }
.formula .res { background: color-mix(in srgb, var(--gold) 18%, var(--panel)); color: var(--gold); }

/* chart */
.chart { max-width: 560px; margin: 18px auto 6px; padding: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; }
.chart svg { display: block; width: 100%; height: auto; }

/* checklist */
.checks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.checks li { margin: 0; display: flex; gap: 10px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: .93rem; line-height: 1.5; }
.checks .ico { color: var(--gather); width: 22px; height: 22px; margin-top: 1px; }

/* faq */
details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; }
summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details > p { margin: 0; padding: 0 16px 14px; }

/* "on the site" panels */
.site { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 10px; margin: 14px 0; }
.site .toollink { margin: 0; border: 0; background: none; padding-bottom: 6px; }
.site-body { padding: 0 14px 14px 70px; font-size: .9rem; }
.site-steps { margin: 0 0 10px; padding-left: 18px; color: var(--body); }
.site-steps li { margin: 3px 0; }
.site-steps b, .site-note b { color: var(--text); font-weight: 600; }
.site-note { margin: 8px 0 0; color: var(--muted); font-size: .86rem; }
.ctls { display: flex; flex-wrap: wrap; gap: 6px; }
.ctl { display: inline-flex; align-items: stretch; border: 1px solid #2c333b; border-radius: 6px; overflow: hidden; font-size: .8rem; line-height: 1.3; }
.ctl i { font-style: normal; color: var(--muted); padding: 4px 8px; background: #11151a; }
.ctl b { color: var(--c); padding: 4px 8px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 600; background: #1b2027; }
.setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 16px 0; counter-reset: s; }
.setup div { position: relative; padding: 12px 14px 12px 46px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; line-height: 1.5; counter-increment: s; }
.setup div::before { content: counter(s); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); font-weight: 700; font-size: .85rem; }
.setup b { display: block; color: var(--text); }

/* presets */
.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 16px 0; }
.preset { padding: 14px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 10px; }
.preset h4 { margin: 0 0 4px; font-size: 1rem; color: var(--c); }
.preset p { margin: 0 0 10px; font-size: .88rem; line-height: 1.5; }
.preset .ctls { flex-direction: column; align-items: flex-start; }
.preset.star { background: linear-gradient(160deg, #221d10, var(--panel)); }

/* shared additions (from the guide rollout) */
.tiles .toollink, .cards .toollink { margin: 0; }
.pills + .lead { margin-top: 18px; }
.tiles.three, .checks.three, .cards.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tiles.two, .cards.two, .setup.two, .checks.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (min-width: 640px) { .tiles.two, .cards.two, .setup.two, .checks.two { grid-template-columns: 1fr 1fr; } }
.checks.one { grid-template-columns: 1fr; }
.wide { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; margin: 18px 0; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--gold); font-weight: 700; }
td:first-child { color: #eef1f4; font-weight: 600; }

@media (max-width: 520px) {
  .site-body { padding-left: 14px; }
  .quad { grid-template-columns: 22px 1fr 1fr; gap: 6px; }
  .q { padding: 10px; font-size: .82rem; min-height: 0; }
  .arrow { flex-basis: 100%; text-align: center; transform: rotate(90deg); line-height: 1; }
  .arrow.sym { transform: none; }
  .step { flex-basis: 100%; flex-direction: row; text-align: left; }
  .step .ico { width: 24px; height: 24px; }
  .toollink .go { display: none; }
}
@media (prefers-reduced-motion: reduce) { .choice { transition: none; } .choice:hover { transform: none; } }
