form:has(> .ct-panel) { min-width: 0; }
/* Portals module (WP-G): personalised home, help centre, community, account, chat window, phone layout. */
.po-hero { background: linear-gradient(120deg, var(--brand-navy-2, #071d42), #0b4a8f 60%, var(--brand-primary, #1a7fe0)); color: #fff; border-radius: 6px; padding: 18px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow); }
.po-hero h2 { color: #fff; margin: 0 0 4px; font-size: 20px; }
.po-hero p { margin: 0; color: #cfe1f5; font-size: 13px; }
.po-hero .grow { flex: 1; min-width: 220px; }
.po-hero form { display: flex; gap: 6px; flex: 1 1 320px; max-width: 520px; }
.po-hero input { flex: 1; min-height: 40px; border: 0; border-radius: 4px; padding: 0 12px; font: 14px var(--fb); min-width: 0; }
.po-hero .ct-btn { min-height: 40px; }
.po-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.po-w { background: #fff; border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.po-w .h { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text2); font-size: 12.5px; }
.po-w .h i { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: var(--infoBg); color: var(--infoFg); font-size: 15px; }
.po-w .v { font-size: 24px; font-weight: 700; line-height: 1.1; }
.po-w .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.po-w .n { font-size: 12px; color: var(--muted); }
.po-w .n.warn { color: var(--warnFg); } .po-w .n.bad { color: var(--badFg); } .po-w .n.ok { color: var(--okFg); }
.po-w ul { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12.5px; }
.po-w li { padding: 5px 0; border-top: 1px solid #eef2f6; display: flex; gap: 6px; justify-content: space-between; }
.po-w li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.po-w .acts { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; padding-top: 6px; }
.po-w.locked { background: var(--panel2); }
.po-rec { display: grid; gap: 8px; }
.po-rec a.r { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid #dde5ed; border-radius: 5px; color: var(--text); background: #fff; }
.po-rec a.r:hover { border-color: #0a6fd2; background: #f5f9ff; }
.po-rec a.r i { font-size: 18px; color: var(--blue); margin-top: 1px; }
.po-rec a.r b { display: block; }
.po-rec a.r small { display: block; color: var(--muted); }
.po-rec a.r em { display: inline-block; margin-top: 3px; font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #5b2bb0; background: #f3e8ff; padding: 1px 6px; border-radius: 3px; }
.po-tasks .t { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef2f6; font-size: 12.5px; }
.po-tasks .t:last-child { border-bottom: 0; }
.po-tasks .t .grow { flex: 1; min-width: 0; }
.po-tasks .t small { display: block; color: var(--muted); }
.po-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.po-cat { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--text); box-shadow: var(--shadow); }
.po-cat:hover { border-color: #0a6fd2; }
.po-cat i { font-size: 22px; color: var(--blue); }
.po-cat b { display: block; }
.po-cat small { color: var(--muted); }
.po-art { font-size: 14px; line-height: 1.7; max-width: 820px; }
.po-art h2, .po-art h3 { margin-top: 1.1em; }
.po-art ol, .po-art ul { padding-left: 22px; }
.po-art table { border-collapse: collapse; } .po-art td, .po-art th { border: 1px solid var(--line2); padding: 6px 8px; }
.po-vote { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px; border: 1px dashed #b9c8d6; border-radius: 5px; background: var(--panel2); }
.po-flow { max-width: 680px; }
.po-flow .q { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.po-flow .opts { display: grid; gap: 8px; }
.po-flow .opts a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #b9c8d6; border-radius: 5px; background: #fff; color: var(--text); font-weight: 700; }
.po-flow .opts a:hover { border-color: #0a6fd2; background: #f2f8ff; }
.po-flow .opts a small { margin-left: auto; color: var(--muted); font-weight: 400; }
.po-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.po-stars input { position: absolute; opacity: 0; pointer-events: none; }
.po-stars label { font-size: 26px; color: #c9d4de; cursor: pointer; line-height: 1; }
.po-stars label:hover, .po-stars label:hover ~ label, .po-stars input:checked ~ label { color: #f5a524; }
.po-stars input:focus-visible + label { outline: 2px solid #0a6fd2; outline-offset: 2px; }
.po-scale { display: flex; flex-wrap: wrap; gap: 4px; }
.po-scale label { min-width: 38px; height: 38px; border: 1px solid #b9c8d6; border-radius: 4px; display: grid; place-items: center; font-weight: 700; cursor: pointer; background: #fff; }
.po-scale input { position: absolute; opacity: 0; pointer-events: none; }
.po-scale label:has(input:checked) { background: #0a6fd2; color: #fff; border-color: #0a6fd2; }
.po-scale label:has(input:focus-visible) { outline: 2px solid #0a6fd2; outline-offset: 2px; }

/* chat window */
.po-chat { display: flex; flex-direction: column; height: min(560px, 70vh); border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.po-chat .head { padding: 10px 14px; background: linear-gradient(120deg, var(--brand-navy-2, #071d42), #0b4a8f); color: #fff; display: flex; align-items: center; gap: 10px; }
.po-chat .head small { color: #cfe1f5; display: block; font-size: 11.5px; }
.po-chat .lines { flex: 1; overflow: auto; padding: 12px; display: grid; gap: 8px; align-content: start; background: #f7fafc; }
.po-chat .l { max-width: 82%; padding: 8px 11px; border-radius: 12px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.po-chat .l small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.po-chat .l.customer { justify-self: end; background: #0a6fd2; color: #fff; border-bottom-right-radius: 3px; }
.po-chat .l.customer small { color: #d6e8fb; }
.po-chat .l.bot { justify-self: start; background: #fff; border: 1px solid #dde5ed; border-bottom-left-radius: 3px; }
.po-chat .l.agent { justify-self: start; background: #e1f6ec; border-bottom-left-radius: 3px; }
.po-chat .l.system { justify-self: center; background: none; color: var(--muted); font-size: 11.5px; font-style: italic; }
.po-chat form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line2); }
.po-chat form input { flex: 1; min-height: 40px; border: 1px solid #b9c8d6; border-radius: 4px; padding: 0 10px; font: 13px var(--fb); min-width: 0; }
.po-chat .quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 8px 8px; }

/* community */
.po-topic { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #e6edf3; }
.po-topic:last-child { border-bottom: 0; }
.po-topic .votes { min-width: 54px; text-align: center; border: 1px solid #dde5ed; border-radius: 5px; padding: 4px; height: fit-content; background: var(--panel2); }
.po-topic .votes b { display: block; font-size: 17px; }
.po-topic .votes small { font-size: 10.5px; color: var(--muted); }
.po-topic .grow { flex: 1; min-width: 0; }
.po-topic .grow > a { font-weight: 700; font-size: 14px; }
.po-topic .meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 3px; align-items: center; }
.po-post { border: 1px solid #dde5ed; border-radius: 5px; background: #fff; }
.po-post.accepted { border-color: #13b985; box-shadow: inset 3px 0 0 #13b985; }
.po-post.staff { background: #f5f9ff; }
.po-post .ph { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #eef2f6; font-size: 12px; flex-wrap: wrap; }
.po-post .pb { padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.po-post .pf { padding: 6px 12px; border-top: 1px dashed #e0e7ed; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.po-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 10px; background: #fff1cc; color: #8b620d; }
.po-lang { display: inline-flex; gap: 2px; border: 1px solid #9fb2c6; border-radius: 3px; overflow: hidden; }
.po-lang button { border: 0; background: #fff; padding: 4px 8px; font: 700 11.5px var(--fb); color: #2f5f88; cursor: pointer; }
.po-lang button.on { background: #0a6fd2; color: #fff; }
.po-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.po-steps li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef2f6; }
.po-steps li .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #e8eef4; color: var(--muted); font-size: 12px; flex: none; }
.po-steps li.done .dot { background: #13b985; color: #fff; }
.po-dir { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.po-dir div { border: 1px solid #dde5ed; border-radius: 5px; padding: 8px 10px; background: #fff; font-size: 12.5px; }
.po-dir b { display: block; }

/* public help centre */
.po-pubwrap { max-width: 1100px; margin: 0 auto; padding: 18px 16px 30px; display: grid; gap: 16px; }

@media (max-width: 720px) {
    .po-hero { padding: 14px; }
    .po-hero form { flex-basis: 100%; }
    .po-chat { height: 70vh; }
    .po-topic { gap: 8px; padding: 10px; }
    .po-topic .votes { min-width: 44px; }
}
