/* gradax_client_ui: docs pages. Tokens and shared components live in gxc.css.
   Public documents (invoice, offer, handover report, contract): a slim sticky bar, the document as a white sheet,
   a side card with the amount and the main action; one column on phones with the action pinned to the bottom. */

.gxd { --gxd-top: 12px; position: relative; padding: 0 15px; }
body.customers:has(.gxd) #content { padding-top: 20px; }

/* ---------- Bar ---------- */
.gxd-bar {
    position: sticky; top: var(--gxd-top); z-index: 1020;
    background: rgb(255 255 255 / .88); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
    border: 1px solid var(--gx-rule); border-radius: 16px; box-shadow: var(--gx-lift);
}
.gxd-bar-in { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 10px 12px 10px 14px; }
.gxd-back {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 10px; border-radius: 10px; flex: none;
    font-size: 14px; font-weight: 600; color: var(--gx-ink-2) !important; text-decoration: none !important; transition: background-color .15s ease;
}
.gxd-back:hover { background: var(--gx-paper); color: var(--gx-ink) !important; }
.gxd-back .gxc-i { width: 17px; height: 17px; }
.gxd-bar-logo img { display: block; width: 104px; height: auto; }
.gxd-bar-id { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--gx-rule); }
.gxd-bar-id small { font-size: 13px; font-weight: 600; color: var(--gx-ink-3); }
.gxd-bar-id b { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.gxd-bar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.gxd-bar-actions form { margin: 0; }
.gxd-bar-actions .gxc-btn { min-height: 44px; }

/* ---------- Grid ---------- */
.gxd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; margin-top: 20px; }
.gxd-main { display: grid; gap: 20px; min-width: 0; }
.gxd-side { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 900px) and (min-height: 760px) {
    .gxd-side { position: sticky; top: calc(var(--gxd-top) + 84px); }
}

/* ---------- The sheet ---------- */
.gxd-sheet {
    min-width: 0; background: var(--gx-surface); border: 1px solid var(--gx-rule); border-radius: var(--gx-r-lg);
    box-shadow: 0 1px 2px rgb(28 26 25 / .04), 0 24px 48px -32px rgb(28 26 25 / .22); padding: 48px 52px 44px;
}
.gxd-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.gxd-logo { display: block; width: 150px; height: auto; }
.gxd-title { text-align: right; min-width: 0; }
.gxd-title small { display: block; font-size: 13px; font-weight: 600; color: var(--gx-ink-3); }
.gxd-title h1 { margin: 2px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gxd-title p { margin: 6px 0 0; font-size: 14.5px; color: var(--gx-ink-2); }

.gxd-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px 24px; margin: 36px 0 0; padding: 18px 0; border-top: 1px solid var(--gx-rule); border-bottom: 1px solid var(--gx-rule); }
.gxd-meta dt { font-size: 12.5px; font-weight: 600; color: var(--gx-ink-3); }
.gxd-meta dd { margin: 3px 0 0; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.gxd-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; margin: 28px 0 32px; }
.gxd-parties > div { min-width: 0; }
.gxd-parties h2 { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--gx-ink-3); letter-spacing: 0; }
.gxd-parties h2 + address + h2 { margin-top: 18px; }
.gxd-parties address { margin: 0; font-style: normal; font-size: 14px; line-height: 1.6; color: var(--gx-ink-2); overflow-wrap: anywhere; }
.gxd-parties address b, .gxd-parties address strong { color: var(--gx-ink); }

/* Items (the stock Perfex table) */
.gxd-items { margin: 0; border: 0; }
body.customers .gxd-items table.items { width: 100%; }
body.customers .gxd-items table.items > thead, body.customers .gxd-items table.items > thead > tr { background: transparent !important; }
body.customers .gxd-items table.items > thead > tr > th { background: transparent !important; border-radius: 0 !important; padding: 10px 12px; border-bottom: 1px solid var(--gx-ink) !important; color: var(--gx-ink-2); font-size: 12.5px; }
body.customers .gxd-items table.items > thead > tr > th:first-child { padding-left: 0; }
body.customers .gxd-items table.items > thead > tr > th:last-child, body.customers .gxd-items table.items > tbody > tr > td:last-child { padding-right: 0; }
body.customers .gxd-items table.items > tbody > tr > td { padding: 16px 12px; vertical-align: top; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--gx-ink-2); }
body.customers .gxd-items table.items > tbody > tr > td:first-child { padding-left: 0; color: var(--gx-ink-3); }
body.customers .gxd-items table.items > tbody > tr:hover > td { background: transparent; }
body.customers .gxd-items table.items td.description { color: var(--gx-ink); line-height: 1.5; white-space: normal; min-width: 180px; }
body.customers .gxd-items table.items td.description strong { font-weight: 700; }
body.customers .gxd-items table.items td.description span[style] { color: var(--gx-ink-3) !important; font-size: 13.5px !important; }
body.customers .gxd-items table.items td.amount { color: var(--gx-ink); font-weight: 600; white-space: nowrap; }
body.customers .gxd-items table.items td[align="right"], body.customers .gxd-items table.items th[align="right"] { text-align: right; white-space: nowrap; }

/* Totals */
.gxd-totals { width: min(100%, 380px); margin: 8px 0 0 auto; }
body.customers .gxd-totals .table > tbody > tr > th, body.customers .gxd-totals .table > tbody > tr > td {
    border: 0 !important; padding: 7px 0; font-size: 14px; font-variant-numeric: tabular-nums; background: transparent;
}
body.customers .gxd-totals .table > tbody > tr > th { font-weight: 500; color: var(--gx-ink-2); text-align: left; }
body.customers .gxd-totals .table > tbody > tr > td { text-align: right; color: var(--gx-ink); white-space: nowrap; padding-left: 16px; }
body.customers .gxd-totals .table > tbody > tr.gxd-total-row > :is(th, td) { border-top: 1px solid var(--gx-ink) !important; padding-top: 14px; font-size: 18px; font-weight: 700; color: var(--gx-ink); letter-spacing: -0.015em; }
body.customers .gxd-totals .table > tbody > tr.gxd-due-row > :is(th, td) { font-weight: 700; color: var(--gx-ink); }
body.customers .gxd-totals .table > tbody > tr:hover > td { background: transparent; }
.gxd-words { margin: 14px 0 0; text-align: right; font-size: 13px; color: var(--gx-ink-2); }
.gxd-words span { font-weight: 700; color: var(--gx-ink-3); margin-right: 6px; }

/* Notes, terms, files, payments */
.gxd-block { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--gx-rule); min-width: 0; }
.gxd-block h2 { margin: 0 0 10px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.gxd-prose { font-size: 13.5px; line-height: 1.65; color: var(--gx-ink-2); overflow-wrap: anywhere; }
.gxd-prose p { margin: 0 0 8px; }
.gxd-muted { margin: 0; font-size: 14px; color: var(--gx-ink-3); }
.gxd .gxc-file { padding: 0 14px 0 12px; min-height: 44px; }
.gxd .gxc-file .gxc-i { margin: 0; }
body.customers .gxd-paytable > thead > tr > th { background: transparent; border-radius: 0 !important; padding: 8px 10px; }
body.customers .gxd-paytable > thead > tr > th:first-child, body.customers .gxd-paytable > tbody > tr > td:first-child { padding-left: 0; }
body.customers .gxd-paytable > tbody > tr > td { padding: 10px; font-variant-numeric: tabular-nums; }
body.customers .gxd-paytable .is-num { text-align: right; white-space: nowrap; font-weight: 600; }
body.customers .gxd-paytable .is-act { width: 52px; text-align: right; padding-right: 0; }
.gxd-paytable form { margin: 0; }
.gxd-paytable .gxc-iconbtn { width: 44px; height: 44px; }

/* Written documents (offer and contract text) */
.gxd-content { margin-top: 32px; font-size: 15px; line-height: 1.7; color: var(--gx-ink); overflow-wrap: anywhere; }
.gxd-content :is(h1, h2, h3, h4) { margin: 1.4em 0 .5em; line-height: 1.3; letter-spacing: -0.015em; }
.gxd-content h1 { font-size: 24px; } .gxd-content h2 { font-size: 20px; } .gxd-content h3 { font-size: 17px; } .gxd-content h4 { font-size: 15px; }
.gxd-content p { margin: 0 0 .9em; }
.gxd-content :is(ul, ol) { padding-left: 1.3em; margin: 0 0 1em; }
.gxd-content img { max-width: 100%; height: auto; border-radius: 8px; }
.gxd-content > :first-child { margin-top: 0; }

/* ---------- Side card ---------- */
.gxd-card { background: var(--gx-surface); border: 1px solid var(--gx-rule); border-radius: var(--gx-r-lg); box-shadow: var(--gx-lift); padding: 22px; min-width: 0; }
.gxd-sum-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gxd-sum-label { font-size: 13.5px; font-weight: 600; color: var(--gx-ink-3); }
.gxd-amount { display: block; margin-top: 6px; font-size: 34px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gxd-sum-line { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13.5px; font-weight: 600; color: var(--gx-ink-2); }
.gxd-sum-line .gxc-i { width: 16px; height: 16px; color: var(--gx-ink-3); }
.gxd-sum-line.is-stop, .gxd-sum-line.is-stop .gxc-i { color: var(--gx-stop); }
.gxd-sum-line.is-good, .gxd-sum-line.is-good .gxc-i { color: var(--gx-good); }
.gxd-sec { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gx-rule); }
.gxd-sec h2, .gxd-pay h2, .gxd-offline h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.gxd-sec p.gxd-note { margin: -4px 0 14px; font-size: 13.5px; color: var(--gx-ink-2); }

.gxd-dl { margin: 14px 0 0; }
.gxd-dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--gx-rule); font-size: 13.5px; }
.gxd-dl > div:first-child { border-top: 0; }
.gxd-dl dt { font-weight: 500; color: var(--gx-ink-3); }
.gxd-dl dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* Payment form */
.gxd-pay { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gx-rule); }
.gxd-pay form { margin: 0; }
.gxd-modes { display: grid; gap: 8px; margin-bottom: 14px; }
.gxd-mode { position: relative; }
.gxd-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gxd-mode label {
    display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 0; padding: 0 14px; border-radius: 12px;
    border: 1px solid var(--gx-rule-2); background: var(--gx-surface); font-size: 14px; font-weight: 600; color: var(--gx-ink); cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.gxd-mode label:hover { border-color: var(--gx-rule-3); }
.gxd-mode-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--gx-rule-3); background: #fff; transition: all .15s ease; }
.gxd-mode input:checked + label { border-color: var(--gx-ink); box-shadow: 0 0 0 1px var(--gx-ink); }
.gxd-mode input:checked + label .gxd-mode-dot { border-color: var(--gx-ink); background: var(--gx-ink); box-shadow: inset 0 0 0 4px #fff; }
.gxd-mode input:focus-visible + label { outline: 2px solid var(--gx-accent); outline-offset: 2px; }
.gxd-mode-note { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--gx-ink-2); overflow-wrap: anywhere; }
.gxd-mode-note p { margin: 0 0 4px; }
.gxd-pay-amount { margin-bottom: 14px; }
body.customers .gxd .gxd-pay-btn, body.customers .gxd-act-panel .btn { width: 100%; min-height: 50px; font-size: 15px; border-radius: 12px; }
.gxd .grx-payment-trust { margin: 14px 0 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--gx-rule); border-radius: 0; box-shadow: none; background: transparent; }
.gxd .grx-payment-trust__label { font-size: 12.5px; font-weight: 600; color: var(--gx-ink-3); }
.gxd .grx-payment-trust__pill { font-weight: 600; color: var(--gx-ink-2); background: var(--gx-paper); border-color: var(--gx-rule); }
.gxd .grx-payment-trust__icons { gap: 8px; }
.gxd .grx-payment-trust__icons img.grx-card { height: 24px; }
.gxd .grx-payment-trust__icons img.grx-stripe { height: 18px; }
.gxd-offline { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gx-rule); display: grid; gap: 12px; }
.gxd-offline h2 { margin-bottom: 0; }
.gxd-offline-mode { padding: 12px 14px; border-radius: 12px; background: var(--gx-paper); }
.gxd-offline-mode b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.gxd-offline-mode b .gxc-i { width: 16px; height: 16px; color: var(--gx-ink-3); }

/* Accept, decline, sign */
.gxd-act-panel { display: grid; gap: 8px; }
.gxd-act-panel form { margin: 0; }
.gxd-act-panel .btn .gxc-i { width: 17px; height: 17px; }
.gxd-signed { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gx-rule); }
.gxd-signed h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 700; }
.gxd-signed h3 .gxc-i { width: 17px; height: 17px; color: var(--gx-good); }
.gxd-side .gxc-files { display: grid; grid-template-columns: minmax(0, 1fr); } /* a long file name ellipsises instead of leaving the card */
.gxd-side .gxc-file span { min-width: 0; }

/* Discussion */
.gxd-talk { padding: 8px 10px 10px; }
.gxd-talk-body { padding: 0 10px 10px; display: grid; gap: 16px; }
.gxd-talk-body .gxc-empty { padding: 0; }
.gxd-talk-form { display: grid; gap: 10px; margin: 0; }
.gxd-talk-form .btn, .gxd-talk-form .gxc-btn { justify-self: end; min-height: 44px; }

/* ---------- Phone action bar ---------- */
.gxd-mbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
    .gxd-grid { grid-template-columns: minmax(0, 1fr) 320px; }
    .gxd-sheet { padding: 40px 36px; }
}
@media (max-width: 899px) {
    .gxd { --gxd-top: 8px; padding: 0; }
    .gxd-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 14px; }
    .gxd-side { order: -1; }
    .gxd-bar { border-radius: 14px; }
    .gxd-bar-in { gap: 8px; min-height: 60px; padding: 8px; }
    .gxd-back { width: 44px; padding: 0; justify-content: center; }
    .gxd-back span, .gxd-pdf .gxc-btn span, .gxd-bar-id small { display: none; }
    .gxd-pdf .gxc-btn { width: 44px; padding: 0; }
    .gxd-bar-id { padding-left: 10px; gap: 8px; }
    .gxd-bar-id b { font-size: 14px; }
    .gxd.has-mbar .gxd-bar-actions > :not(form) { display: none; }
    .gxd.has-mbar { padding-bottom: 92px; }
    .gxd-mbar {
        display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1025;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .94);
        -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
        border-top: 1px solid var(--gx-rule); box-shadow: 0 -12px 32px -24px rgb(28 26 25 / .35);
        transition: transform .25s var(--gx-ease), opacity .2s ease;
    }
    .gxd-mbar.is-hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }
    .gxd-mbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .gxd-mbar-sum { display: grid; min-width: 0; }
    .gxd-mbar-sum small { font-size: 12px; font-weight: 600; color: var(--gx-ink-3); }
    .gxd-mbar-sum b { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .gxd-mbar .gxc-btn { min-height: 48px; flex: none; }
}
@media (max-width: 639px) {
    .gxd-sheet { padding: 24px 18px 28px; border-radius: 16px; }
    .gxd-sheet-head { flex-direction: column; gap: 18px; }
    .gxd-logo { width: 124px; }
    .gxd-title { text-align: left; }
    .gxd-title h1 { font-size: 24px; }
    .gxd-meta { grid-template-columns: 1fr 1fr; margin-top: 24px; }
    .gxd-parties { grid-template-columns: 1fr; margin: 22px 0 24px; }
    .gxd-card { padding: 18px; }
    .gxd-amount { font-size: 30px; }
    /* Items become stacked rows: name, then quantity x price, amount on the right. */
    body.customers .gxd-items table.items, body.customers .gxd-items table.items > tbody { display: block; }
    body.customers .gxd-items table.items > thead { display: none; }
    body.customers .gxd-items table.items > tbody > tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 14px 0; border-top: 1px solid var(--gx-rule); }
    body.customers .gxd-items table.items > tbody > tr:first-child { border-top: 1px solid var(--gx-ink); }
    body.customers .gxd-items table.items > tbody > tr > td { display: block; width: auto !important; padding: 0 !important; border: 0 !important; font-size: 13.5px; }
    body.customers .gxd-items table.items > tbody > tr > td:first-child { display: none; }
    body.customers .gxd-items table.items > tbody > tr > td.description { flex: 1 0 100%; min-width: 0; margin-bottom: 4px; font-size: 14px; white-space: normal !important; }
    body.customers .gxd-items table.items > tbody > tr > td:nth-child(3)::after { content: " \00d7"; color: var(--gx-ink-3); }
    body.customers .gxd-items table.items > tbody > tr > td.amount { margin-left: auto; font-size: 14.5px; }
    .gxd-totals { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .gxd-mbar { transition: none; }
}
@media print {
    .gxd-bar, .gxd-mbar, .gxd-side, .gxd-talk { display: none !important; }
    .gxd-grid { display: block; }
    .gxd-sheet { border: 0; box-shadow: none; padding: 0; }
}
.gxd-side .gxd-block { margin-top: 0; padding-top: 18px; }
@media (max-width: 639px) { .gxd-bar-logo { display: none; } .gxd-bar-id { border-left: 0; padding-left: 4px; } }


/* ---------- Contract from GRADAX CRM (doc_parts/contract_body.php) ---------- */
.gxk { margin-top: 8px; }
.gxk-meta { margin-top: 28px; }
.gxk-intro { margin: 0 0 18px; font-size: 14.5px; line-height: 1.65; color: var(--gx-ink-2); max-width: 64ch; }
.gxk-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 30px; padding: 14px; background: var(--gx-paper); border-radius: var(--gx-r); }
.gxk-toc a { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px 0 6px; border-radius: 999px; background: var(--gx-surface);
    border: 1px solid var(--gx-rule); font-size: 13px; font-weight: 600; color: var(--gx-ink-2) !important; text-decoration: none !important;
    transition: border-color .15s ease, color .15s ease; }
.gxk-toc a:hover { border-color: var(--gx-ink-3); color: var(--gx-ink) !important; }
.gxk-toc a span { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px;
    background: var(--gx-paper); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gx-ink); }
.gxk-art { padding: 22px 0 6px; border-top: 1px solid var(--gx-rule); scroll-margin-top: 110px; }
.gxk-art h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.gxk-n { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 9px;
    background: var(--gx-ink); color: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gxk-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gxk-items li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 0 12px; }
.gxk-sub { padding-top: 1px; font-size: 13px; font-weight: 700; color: var(--gx-ink-3); font-variant-numeric: tabular-nums; }
.gxk-items p { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--gx-ink); max-width: 70ch; }
.gxk-box { margin: 14px 0 6px 54px; padding: 14px 16px; border-radius: var(--gx-r); background: var(--gx-paper); }
.gxk-box b { display: block; font-size: 13.5px; font-weight: 700; }
.gxk-box ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.6; color: var(--gx-ink-2); }
.gxk-signs { margin-top: 18px; padding-top: 24px; border-top: 1px solid var(--gx-rule); scroll-margin-top: 110px; }
.gxk-signs h2 { margin: 0 0 14px; font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.gxk-sign-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gxk-sign { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 18px; border: 1px solid var(--gx-rule); border-radius: var(--gx-r); }
.gxk-sign small { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gx-ink-3); }
.gxk-sign b { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.gxk-sign span { font-size: 14px; color: var(--gx-ink-2); }
.gxk-sign p { margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: var(--gx-ink-3); overflow-wrap: anywhere; }
.gxk-sign.is-signed { border-color: color-mix(in srgb, var(--gx-good) 35%, var(--gx-rule)); }
.gxk-sig { display: block; height: 64px; width: auto; max-width: 100%; margin: 4px 0 2px; object-fit: contain; object-position: left; }
.gxk-offer { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 14px; border-radius: var(--gx-r); background: var(--gx-paper);
    color: var(--gx-ink) !important; text-decoration: none !important; transition: background-color .15s ease; }
.gxk-offer:hover { background: var(--gx-tint); }
.gxk-offer .gxc-i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--gx-accent); }
.gxk-offer b { display: block; font-size: 14px; font-weight: 700; }
.gxk-offer small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--gx-ink-2); }
@media (max-width: 639px) {
    .gxk-sign-grid { grid-template-columns: 1fr; }
    .gxk-items li { grid-template-columns: 34px minmax(0, 1fr); gap: 0 8px; }
    .gxk-box { margin-left: 0; }
    .gxk-toc { margin-left: -4px; margin-right: -4px; }
}
@media print { .gxk-toc { display: none; } }

/* Marketing service under the contract (service_subscriptions views _contract_service / _contract_cancel). */
.gxk-svc-name { display: block; margin-top: 10px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.gxk-svc-note { margin: 6px 0 0; font-size: 13.5px; color: var(--gx-warn); }
.gxk-svc-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.gxk-svc-cancel { min-height: 44px; display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--gx-ink-2) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.gxk-svc-cancel:hover { color: var(--gx-stop) !important; }
.gxk-cancel { margin-top: 18px; padding: 22px; border: 1px solid var(--gx-rule); border-radius: var(--gx-r-lg); background: var(--gx-surface); scroll-margin-top: 110px; }
.gxk-cancel.is-scheduled { border-color: color-mix(in srgb, var(--gx-warn) 40%, var(--gx-rule)); background: var(--gx-warn-bg); }
.gxk-cancel-head { display: flex; align-items: center; gap: 12px; }
.gxk-cancel-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--gx-paper); }
.gxk-cancel.is-scheduled .gxk-cancel-icon { background: var(--gx-surface); color: var(--gx-warn); }
.gxk-cancel-icon .gxc-i { width: 19px; height: 19px; }
.gxk-cancel h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.gxk-cancel-service { margin: 2px 0 0; font-size: 13.5px; color: var(--gx-ink-2); }
.gxk-cancel-lead { margin: 16px 0 0; font-size: 15px; line-height: 1.6; max-width: 64ch; }
.gxk-cancel h3 { margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--gx-ink-3); letter-spacing: .02em; }
.gxk-cancel-steps { margin: 0; padding: 0; list-style: none; counter-reset: gxk; display: grid; gap: 8px; }
.gxk-cancel-steps li { counter-increment: gxk; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; font-size: 14.5px; line-height: 1.6; max-width: 70ch; }
.gxk-cancel-steps li::before { content: counter(gxk); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: 1px;
    border-radius: 999px; background: var(--gx-paper); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gxk-cancel-steps li.is-warn { font-weight: 600; }
.gxk-cancel-steps li.is-warn::before { background: var(--gx-stop-bg); color: var(--gx-stop); }
.gxk-cancel-note { margin: 16px 0 0; font-size: 14px; color: var(--gx-ink-2); }
.gxk-cancel-open { margin-top: 18px; }
.gxk-cancel-open > summary { list-style: none; cursor: pointer; display: inline-flex; }
.gxk-cancel-open > summary::-webkit-details-marker { display: none; }
.gxk-cancel-open[open] > summary { display: none; }
.gxk-cancel-form { display: grid; gap: 8px; margin-top: 16px; max-width: 520px; }
.gxk-cancel-form label { font-size: 13.5px; font-weight: 600; color: var(--gx-ink-2); margin: 6px 0 0; }
.gxk-cancel-form :is(input[type="text"], textarea) { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--gx-rule-3, #cfd1d6); border-radius: 12px;
    font: 400 16px/1.4 var(--gx-font); color: var(--gx-ink); background: var(--gx-surface); }
.gxk-cancel-form :is(input, textarea):focus { outline: none; border-color: var(--gx-accent); box-shadow: 0 0 0 3px rgb(234 95 14 / .18); }
.gxk-cancel-form .gxk-cancel-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; line-height: 1.5; margin-top: 10px; }
.gxk-cancel-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gx-ink); }
.gxk-cancel-form .gxc-btn { justify-self: start; margin-top: 8px; }
@media (max-width: 639px) { .gxk-cancel { padding: 18px; } .gxk-cancel-form .gxc-btn { justify-self: stretch; } }
