/* /predictions/table-tennis/ only (enqueued by mu-plugins/betadvisor-page-table-tennis.php). Prefix tt-. */

/* ----- Compact page head so the calculator reaches the first screen ----- */
.tpl-prediction .page-head--band { padding: 10px 0 12px; margin-bottom: 12px; }
.tpl-prediction .page-head--band .page-title { font-size: clamp(1.55rem, 4.6vw, 2.3rem); margin: .1em 0 .2em; }
.tpl-prediction .page-head--band .lead { font-size: .98rem; margin: 0 0 .4em; max-width: 62ch; }
.tpl-prediction .page-head--band .meta-line { margin: 0; font-size: .82rem; }
.tpl-prediction .notice { padding: 8px 12px 8px 36px; font-size: .84rem; margin: 0 0 12px; }
.tpl-prediction .entry { padding-top: 14px; }
@media (max-width: 640px) {
	.tpl-prediction .page-head--band .eyebrow { display: none; }
	.tpl-prediction .page-head--band .lead { font-size: .92rem; }
}

/* ----- Contents strip, numbered headings ----- */
.tt-carnet { margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfaf6; padding: 14px 16px; }
.tt-carnet__head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; font-size: .9rem; }
.tt-carnet__head span { color: var(--ink-soft); font-size: .82rem; }
.tt-carnet ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .tt-carnet ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tt-carnet li { margin: 0; }
.tt-carnet a { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; text-decoration: none; color: var(--ink); font-size: .93rem; }
.tt-carnet a:hover { color: var(--green-2); }
.tt-carnet__n { font-family: var(--mono); font-weight: 700; font-size: .8rem; color: var(--green-2); min-width: 22px; }
.entry-content h2.tt-h { display: flex; align-items: baseline; gap: 12px; }
.entry-content h2.tt-h::before { display: none; }
.tt-h__n { flex: none; font-family: var(--mono); font-size: .95rem; font-weight: 700; color: var(--green); background: var(--lime); border-radius: 6px; padding: 2px 7px; line-height: 1.3; }

/* ----- Answer strip ----- */
.tt-answer { margin: 0 0 20px; padding: 14px 16px; border-radius: var(--radius); background: var(--green); color: #dcebe3; }
.tt-answer p { margin: 0 0 10px; }
.tt-answer strong { color: #fff; }
.tt-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .tt-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tt-stats li { margin: 0; padding: 9px 11px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); line-height: 1.3; font-size: .8rem; color: #cfe2d8; }
.tt-stats b { display: block; font-family: var(--font-head); font-size: 1.2rem; color: var(--lime); }

/* ----- Cards, steps, tables, flags, notes ----- */
.tt-cards { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); margin: 0 0 18px; }
@media (min-width: 640px) { .tt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .tt-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tt-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfaf6; }
.tt-card p { margin: 0 0 4px; font-size: .9rem; }
.tt-card__name { font-weight: 800; color: var(--green); font-size: 1rem !important; }
.tt-card__tag { display: inline-block; margin: 0 0 6px; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; background: var(--green-soft); color: var(--green-2); }
.tt-card__tag--warn { background: #fff1d6; color: #7a5200; }
.tt-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; counter-reset: tts; }
.tt-steps li { margin: 0; position: relative; padding: 10px 12px 10px 52px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfaf6; counter-increment: tts; font-size: .94rem; }
.tt-steps li::before { content: counter(tts, decimal-leading-zero); position: absolute; left: 12px; top: 10px; font-family: var(--mono); font-weight: 700; color: var(--green); background: var(--lime); border-radius: 5px; padding: 0 5px; font-size: .82rem; }
.tt-steps b { color: var(--green); }
.tt-table { display: block; overflow-x: auto; }
.entry-content table.tt-table tr.is-key td { background: rgba(183, 227, 74, .22); font-weight: 700; }
.tt-flags { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.tt-flags li { margin: 0; display: grid; gap: 4px 14px; grid-template-columns: minmax(0, 1fr); padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
@media (min-width: 760px) { .tt-flags li { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.tt-flags__claim { font-weight: 800; color: #a4511b; }
.tt-flags__real::before { content: "Reality: "; font-weight: 700; color: var(--green-2); }
.tt-note { padding: 10px 14px; border-left: 4px solid var(--gold); background: #fffbef; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .93rem; }
.tt-pair { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin: 0 0 20px; }
@media (min-width: 760px) { .tt-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tt-box { border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--line); background: var(--card); }
.tt-box h3 { margin: 0 0 8px; font-size: 1.02rem; }
.tt-box ul { margin: 0; padding-left: 1.1em; font-size: .94rem; }
.tt-box--keep { border-top: 4px solid var(--green-2); }
.tt-box--watch { border-top: 4px solid var(--red-line); background: #fffaf5; }

/* ----- Match calculator ----- */
.tt-calc { margin: 0 0 20px; border: 2px solid var(--green); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.tt-calc__head { background: var(--green); padding: 12px 14px; }
.tt-calc__title { margin: 0 0 4px; font-family: var(--font-head); font-weight: 800; font-size: 1.12rem; color: #fff; }
.tt-calc__sub { margin: 0; font-size: .84rem; color: #cfe2d8; }
.tt-calc__body { display: grid; gap: 14px; padding: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .tt-calc__body { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 22px; } }
.tt-calc__form { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.tt-f { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--ink-soft); min-width: 0; }
.tt-f--wide { grid-column: 1 / -1; }
.tt-f output { font-family: var(--font-head); font-size: 1.05rem; color: var(--green); }
.tt-f input[type=range] { width: 100%; accent-color: var(--green-2); }
.tt-f input[type=number], .tt-f select { width: 100%; min-height: 42px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: 700 .95rem var(--font); background: #fbfaf6; color: var(--ink); }
.tt-calc__kpi { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 10px; }
.tt-calc__kpi p { margin: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--green-soft); display: flex; flex-direction: column; min-width: 0; }
.tt-calc__kpi span { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); font-weight: 700; }
.tt-calc__kpi b { font-family: var(--font-head); font-size: 1.25rem; color: var(--green); }
.tt-calc__kpi small { font-size: .74rem; color: var(--ink-soft); }
.tt-calc__kpi p.is-up { background: #e6f3da; }
.tt-calc__kpi p.is-down { background: var(--red-soft); }
.tt-calc__kpi p.is-down b { color: #a4511b; }
.tt-calc__cap { margin: 0 0 4px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.tt-bars { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); grid-auto-flow: column; height: 130px; }
.tt-bar { margin: 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.tt-bar__v { font-size: .66rem; font-weight: 700; white-space: nowrap; }
.tt-bar__c { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; border-bottom: 2px solid var(--ink-soft); }
.tt-bar__c i { display: block; width: 72%; border-radius: 4px 4px 0 0; }
.tt-bar--a .tt-bar__c i { background: var(--green-2); }
.tt-bar--b .tt-bar__c i { background: #d99a00; }
.tt-bar__l { font-family: var(--mono); font-size: .74rem; font-weight: 700; margin-top: 2px; }
.tt-calc__table { width: 100%; border-collapse: collapse; font-size: .84rem; margin: 0; }
.tt-calc__table th, .tt-calc__table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.tt-calc__table th { background: var(--green-soft); color: var(--green); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.tt-calc__table td:nth-child(n+2) { white-space: nowrap; font-weight: 700; }
.tt-calc__note { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--ink-soft); background: #fbfaf6; }
