/* ============================================================
   Coindaily - Prediction Markets (cards, screener, FAQ)
   ============================================================ */

/* ---- market cards ---- */
.pm-card { display: flex; flex-direction: column; gap: 11px; background: var(--panel); border: 1px solid var(--hairline); border-radius: 14px; padding: 16px 17px; text-decoration: none; transition: .15s; }
a.pm-card:hover { border-color: rgba(201,154,75,.35); background: var(--panel-2); transform: translateY(-1px); }
.pm-card-top { display: flex; align-items: center; justify-content: space-between; }
.pm-cat { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; border-radius: 5px; padding: 3px 8px; }
.pm-cat-crypto { color: #C99A4B; background: rgba(201,154,75,.12); border: 1px solid rgba(201,154,75,.3); }
.pm-cat-macro { color: #5B86C9; background: rgba(91,134,201,.13); border: 1px solid rgba(91,134,201,.32); }
.pm-cat-geo { color: #a98ad0; background: rgba(155,124,201,.13); border: 1px solid rgba(155,124,201,.32); }
.pm-vol24 { font-family: var(--mono); font-size: 10.5px; color: var(--tx-dim); }
.pm-q { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 600; color: var(--tx-hi); line-height: 1.35; min-height: 38px; }
.pm-q-ic { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex: none; margin-top: 1px; background: var(--panel-2); border: 1px solid var(--hairline); }
.pm-q-t { display: block; }
.pm-outcomes { display: flex; flex-direction: column; gap: 7px; }
.pm-out { display: flex; align-items: center; gap: 10px; }
.pm-out-n { font-size: 11.5px; color: var(--tx-mid); width: 130px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-bar { flex: 1; height: 6px; background: var(--hairline-2); border-radius: 3px; overflow: hidden; }
.pm-bar i { display: block; height: 100%; background: linear-gradient(90deg, #C99A4B, #E0B978); border-radius: 3px; }
.pm-out-p { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--tx-hi); width: 38px; text-align: right; flex: none; }
.pm-spark-wrap { padding: 1px 0; cursor: crosshair; }
.pm-spark { display: block; }
.pm-foot { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--tx-dim); border-top: 1px solid var(--hairline-2); padding-top: 10px; }
/* prominent source link */
.pm-src { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--amber); text-decoration: none; align-self: flex-start; }
.pm-src:hover { text-decoration: underline; }

.pm-model.pm-live { color: #66a386; background: rgba(79,158,124,.12); border-color: rgba(79,158,124,.32); padding-left: 19px; position: relative; }
.pm-model.pm-live::before { content: ""; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; background: #4F9E7C; animation: pm-dot 1.7s ease-out infinite; }
@keyframes pm-dot { 0% { box-shadow: 0 0 0 0 rgba(79,158,124,.55); } 100% { box-shadow: 0 0 0 7px rgba(79,158,124,0); } }
.pm-model.pm-off { color: #b06b6b; background: rgba(190,94,108,.1); border-color: rgba(190,94,108,.3); }

/* LIVE pill + pulse + freshness ticker (screener header) */
.pm-live-pill { display: none; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .07em; color: #66a386; background: rgba(79,158,124,.12); border: 1px solid rgba(79,158,124,.3); border-radius: 20px; padding: 4px 11px 4px 9px; }
.pm-live-pill.on { display: inline-flex; }
h2 .pm-live-pill { vertical-align: middle; }
h2 .pm-updated { vertical-align: middle; font-weight: 400; }
.pm-pulse { width: 7px; height: 7px; border-radius: 50%; background: #4F9E7C; position: relative; }
.pm-pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: #4F9E7C; opacity: .55; animation: pm-pulse 1.7s ease-out infinite; }
@keyframes pm-pulse { 0% { transform: scale(.5); opacity: .55; } 100% { transform: scale(2.4); opacity: 0; } }
.pm-updated { font-family: var(--mono); font-size: 11px; color: var(--tx-dim); }

/* animate bars + flash probabilities on change (live terminal feel) */
.pm-bar i { transition: width .6s cubic-bezier(.4,0,.2,1); }
.pm-out-p.flash-up { animation: pm-flash-up 1.4s ease-out; }
.pm-out-p.flash-down { animation: pm-flash-down 1.4s ease-out; }
@keyframes pm-flash-up { 0%, 25% { color: #4F9E7C; } 100% { color: var(--tx-hi); } }
@keyframes pm-flash-down { 0%, 25% { color: #BE5E6C; } 100% { color: var(--tx-hi); } }

/* loading / unavailable states (live-only) */
.pm-loading, .pm-empty { grid-column: 1 / -1; text-align: center; padding: 40px 22px; color: var(--tx-dim); font-size: 13px; border: 1px dashed var(--hairline); border-radius: 14px; }
.pm-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--hairline); border-top-color: var(--amber); border-radius: 50%; animation: pm-rot .7s linear infinite; vertical-align: -2px; margin-right: 7px; }
@keyframes pm-rot { to { transform: rotate(360deg); } }

/* ---- home trending grid ---- */
#pm-trending { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1000px) { #pm-trending { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { #pm-trending { grid-template-columns: 1fr; } }

/* ---- dedicated screener grid ---- */
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

/* ---- disclaimer line ---- */
.pm-disclaimer { font-size: 11px; line-height: 1.6; color: var(--tx-dim); margin-top: 16px; max-width: 900px; }
.pm-disclaimer b { color: var(--tx-mid); }
.pm-disclaimer a { color: var(--amber); }

/* ---- tabs ---- */
.pm-tabs { display: inline-flex; gap: 4px; background: var(--panel-2); border: 1px solid var(--hairline); border-radius: 9px; padding: 3px; }
.pm-tabs button { background: none; border: none; color: var(--tx-mid); font-family: var(--sans); font-size: 12.5px; font-weight: 600; padding: 7px 15px; border-radius: 7px; cursor: pointer; transition: .12s; }
.pm-tabs button:hover { color: var(--tx-hi); }
.pm-tabs button.active { background: var(--panel); color: var(--tx-hi); box-shadow: 0 1px 2px rgba(0,0,0,.3); }

/* ---- dedicated page: hero, regulatory box, education, FAQ ---- */
.pm-hero { border-bottom: 1px solid var(--hairline); padding: 22px 0 24px; }
.pm-hero .crumb { margin-bottom: 14px; }
.pm-eyebrow { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; }
.pm-hero h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pm-model { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .08em; color: #C99A4B; background: rgba(201,154,75,.12); border: 1px solid rgba(201,154,75,.32); border-radius: 5px; padding: 3px 8px; }
.pm-hero .pm-sub { font-size: 13px; line-height: 1.55; color: var(--tx-mid); max-width: 540px; margin-top: 11px; }
.pm-hero-grid { display: grid; grid-template-columns: 1fr minmax(250px, 330px); gap: 30px; align-items: start; }

.pm-main { padding: 22px 0 56px; }

/* condensed regulatory note, top-right of hero */
.pm-reg { background: rgba(190,94,108,.06); border: 1px solid rgba(190,94,108,.28); border-radius: 12px; padding: 12px 14px; }
.pm-reg-head { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #c77e6e; margin-bottom: 7px; }
.pm-reg-ic { flex: none; }
.pm-reg p { font-size: 11.5px; line-height: 1.55; color: var(--tx-mid); margin: 0; }
.pm-reg a { color: var(--amber); white-space: nowrap; }
@media (max-width: 860px) { .pm-hero-grid { grid-template-columns: 1fr; gap: 18px; } }

.pm-sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.pm-sec-head h2 { font-size: 18px; font-weight: 700; }
.pm-count { font-family: var(--mono); font-size: 11.5px; color: var(--tx-dim); }
.pm-sec-head .pm-tabs { margin-left: auto; }

.pm-edu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 30px 0 8px; }
.pm-edu-card { background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; padding: 15px 16px; }
.pm-edu-card .n { font-family: var(--mono); font-size: 11px; color: var(--amber); font-weight: 600; margin-bottom: 8px; }
.pm-edu-card h5 { font-size: 13px; color: var(--tx-hi); margin-bottom: 6px; }
.pm-edu-card p { font-size: 12px; line-height: 1.55; color: var(--tx-mid); }

.pm-faq { display: flex; flex-direction: column; gap: 10px; }
.pm-faq details { background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; padding: 0 17px; }
.pm-faq summary { font-size: 13.5px; font-weight: 600; color: var(--tx-hi); padding: 15px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pm-faq summary::-webkit-details-marker { display: none; }
.pm-faq summary::after { content: "+"; color: var(--amber); font-size: 19px; line-height: 1; flex: none; }
.pm-faq details[open] summary::after { content: "\2212"; }
.pm-faq details > p { font-size: 12.5px; line-height: 1.7; color: var(--tx-mid); padding: 0 0 16px; margin: 0; }
.pm-faq a { color: var(--amber); }

.pm-section-title { font-size: 18px; font-weight: 700; margin: 36px 0 14px; }
.pm-sources { font-size: 11.5px; line-height: 1.6; color: var(--tx-dim); margin-top: 26px; max-width: 900px; }
.pm-sources a { color: var(--amber); }

@media (max-width: 900px) { .pm-edu { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pm-edu { grid-template-columns: 1fr; } .pm-hero h1 { font-size: 26px; } }
