/* Help & Tools page. Self-hosted, no inline CSS (CSP). */
:root { --ink:#0f172a; --text:#1e293b; --muted:#5b6b80; --line:#e4e8ef; --canvas:#f3f5f9; --surface:#fff; --brand:#0a6460; --brand-dark:#032e2c; --gold:#d79624; --red:#dc2626; --green:#059669; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--text); font: 15px/1.6 "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brand); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
h2 { margin: 0 0 10px; font-size: 18px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h3 { margin: 0 0 4px; font-size: 15px; color: var(--ink); }

.top { background: var(--brand-dark); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1100px; margin: 0 auto; padding: 12px 20px 6px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; line-height: 1.15; }
.brand img { border-radius: 8px; } .brand small { display: block; font-weight: 500; font-size: 11px; color: #a9c9c6; }
.back { color: #cfe3e1; text-decoration: none; font-size: 14px; } .back:hover { color: #fff; }
.tabs { max-width: 1100px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: #b8d4d1; font: 600 14px inherit; font-family: inherit; padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button:hover { color: #fff; }
.tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--gold); }
.tabs i { margin-right: 6px; }

.page { max-width: 1100px; margin: 22px auto 60px; padding: 0 20px; }
.tab { display: block; }
.grid2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-bottom: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 18px; }
.grid2 > .card, .stack > .card { margin-bottom: 0; }

input, select, textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #cdd5e0; border-radius: 9px; background: #fff; color: var(--text); }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #f3c25b; outline-offset: 1px; }
.form { display: grid; gap: 8px; margin-top: 8px; }
.form label { font-weight: 700; font-size: 13px; margin-top: 6px; }
.form .check, label.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; }
.form.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.form.inline input[type="email"] { max-width: 280px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 14px inherit; font-family: inherit; padding: 9px 16px; border-radius: 9px; border: 1.5px solid #c3ced9; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { background: #f4f8f8; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: #0d7a75; }
.btn.danger { color: var(--red); border-color: #f1b4b4; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .55; cursor: wait; }
.link { background: none; border: 0; color: var(--brand); font: 600 14px inherit; font-family: inherit; cursor: pointer; padding: 0 0 10px; }
.pill { font-size: 11.5px; font-weight: 700; background: #eef2f6; color: var(--muted); border-radius: 999px; padding: 2px 10px; }
.pill.good { background: #d1fae5; color: #065f46; } .pill.warn { background: #fef3c7; color: #92400e; } .pill.bad { background: #fee2e2; color: #991b1b; }
.note { background: #f4f8f8; border-left: 4px solid var(--brand); border-radius: 6px; padding: 12px 14px; margin-top: 16px; font-size: 14px; }
.copy { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.copy code { flex: 1; overflow-wrap: anywhere; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; }
.contact { line-height: 2; }

details { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; padding: 0 14px; background: #fff; }
summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 11px 0; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
summary::-webkit-details-marker { display: none; } summary::after { content: "+"; color: var(--brand); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p, details li { margin: 0 0 8px; } details ul { padding-left: 20px; margin: 0 0 8px; }
.empty { text-align: center; color: var(--muted); padding: 22px 0; }

.tablewrap { overflow-x: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tkt { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin: 8px 0; cursor: pointer; font: inherit; color: inherit; }
.tkt:hover { border-color: var(--brand); }
.tkt b { display: block; color: var(--ink); } .tkt span { font-size: 12.5px; color: var(--muted); }
.msg { border-radius: 10px; padding: 10px 13px; margin: 8px 0; max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.customer { background: #eef6f5; margin-left: auto; } .msg.support { background: #fff7e6; border: 1px solid #f3d9a6; }
.msg small { display: block; color: var(--muted); margin-bottom: 2px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi small { color: var(--muted); display: block; } .kpi b { font-size: 24px; color: var(--ink); } .kpi em { font-style: normal; font-size: 12.5px; }
.kpi .good { color: var(--green); } .kpi .bad { color: var(--red); }
.chart { min-height: 190px; } .chart svg { width: 100%; height: auto; display: block; }
.chart .axis { stroke: #cbd5e1; } .chart .grid { stroke: #eef2f6; } .chart text { fill: #64748b; font-size: 10px; font-family: inherit; }
.chart .line { fill: none; stroke: #0a6460; stroke-width: 2.2; } .chart .area { fill: rgba(10,100,96,.1); } .chart .bar { fill: #0d7a75; }
.preview { margin-top: 14px; border: 1px dashed #c3ced9; border-radius: 10px; padding: 16px; background: #fff; }

.toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; max-width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast.bad { background: #991b1b; } .toast.good { background: #065f46; }

.news h3 { margin-top: 18px; } .news ul { margin: 6px 0 0; padding-left: 20px; }

@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } .kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr; } .page { padding: 0 12px; } .msg { max-width: 100%; } }
