/* /tools/ hub (th- prefix). Loaded only there by mu-plugins/betadvisor-page-tools-hub.php. Mobile first. */

/* Tool first: compact head, no hero image on this hub */
.tpl-hub .page-head--band { padding-top: 14px; padding-bottom: 12px; }
.tpl-hub .page-head h1 { margin-bottom: .2em; }
.tpl-hub .page-head .lead { margin-bottom: 4px; font-size: 1rem; }
.tpl-hub .page-hero { display: none; }

.th-hub { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin: 0 0 22px; }
@media (min-width: 900px) { .th-hub { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 18px; align-items: start; } }

/* Quick check */
.th-quick { padding: 14px; border-radius: var(--radius); background: var(--green); color: #dbe9e2; box-shadow: var(--shadow); }
.th-quick__t { margin: 0 0 8px !important; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--lime); }
.th-quick__in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.th-quick__in label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 700; color: #cfe2d8; }
.th-quick__in input { width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); font: 800 1.1rem/1.2 var(--font); color: var(--ink); background: #fff; }
.th-quick__in input:focus { outline: 3px solid var(--gold); }
.th-quick__in input.is-bad { background: var(--red-soft); }
.th-quick__help { margin: 6px 0 10px !important; font-size: .74rem; color: #a9c6b7; }
.th-quick__help a { color: var(--lime); }
.th-quick__out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.th-quick__out div { padding: 7px 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); min-width: 0; }
.th-quick__out .th-big { grid-column: 1 / -1; background: rgba(183, 227, 74, .14); }
.th-quick__out dt { font-size: .68rem; color: #a9c6b7; }
.th-quick__out dd { margin: 0; font-weight: 800; color: #fff; font-size: .9rem; overflow-wrap: anywhere; }
.th-quick__out .th-big dd { font-family: var(--font-head); font-size: 1.8rem; line-height: 1.1; }

/* Tool cards */
.th-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .th-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.th-cards li { margin: 0; min-width: 0; }
.th-card { height: 100%; display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.th-card:hover { border-color: var(--green-2); transform: translateY(-2px); color: var(--ink); }
.th-card__ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--green-soft); color: var(--green); font-family: var(--mono); font-weight: 800; font-size: .78rem; }
.th-card--acca .th-card__ico { background: var(--lime); }
.th-card--codes .th-card__ico { background: var(--gold); color: var(--gold-ink); }
.th-card__txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.th-card__t { font-weight: 800; font-size: .86rem; color: var(--green); }
.th-card__q { font-size: .74rem; color: var(--ink-soft); }
.th-hub__note { grid-column: 1 / -1; margin: 0 !important; font-size: .76rem; color: var(--ink-soft); }
@media (max-width: 400px) { .th-card { padding: 8px; gap: 7px; } .th-card__ico { width: 30px; height: 30px; font-size: .7rem; } .th-card__t { font-size: .8rem; } }

/* Decision table and examples */
.th-table { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.th-table table { margin: 0; }
.th-table tbody tr:nth-child(even) td { background: #fbfaf6; }
@media (max-width: 480px) { .th-table th, .th-table td { padding: 8px; font-size: .84rem; } }
.th-ex { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); margin: 0 0 16px; }
@media (min-width: 640px) { .th-ex { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.th-ex div { padding: 14px; border-radius: var(--radius-sm); background: #fbfaf6; border: 1px solid var(--line); border-left: 4px solid var(--green-2); }
.th-ex p { margin: 0 0 4px; font-size: .9rem; }
.th-ex__t { font-weight: 800; color: var(--green); }
.th-ex code { font-size: .84rem; }

/* Flow: question -> tool */
.th-flow { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.th-flow li { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: center; gap: 6px; }
.th-flow__q { padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: .86rem; font-weight: 600; }
.th-flow__arrow { height: 14px; background: var(--green-2); clip-path: polygon(0 35%, 60% 35%, 60% 0, 100% 50%, 60% 100%, 60% 65%, 0 65%); }
.th-flow__a { padding: 9px 12px; border-radius: 10px; background: var(--green-soft); font-size: .86rem; font-weight: 800; color: var(--green); }
.th-flow__a a { color: inherit; }
.th-rg { margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--green-soft); font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .th-card { transition: none; } .th-card:hover { transform: none; } }
