/*
 * PairLayer customer portal.
 *
 * Plain CSS, loaded by <link> beside the portal script, for the same reason the
 * script is plain: these pages are served by the website layout and not by an
 * asset bundle, so there is no SCSS pipeline here to compile against.
 *
 * The palette comes from the mark: a deep navy layer and a cyan one,
 * interlocking. The interface repeats that idea rather than merely borrowing
 * the two colours — navy carries structure, and cyan marks the live edge of
 * whatever is currently happening, so the eye lands on the thing that moved.
 *
 * Everything is namespaced under .o_pairlayer or .plw. The portal is
 * Bootstrap's house, and a rule reaching outside those prefixes would be
 * redecorating somebody else's rooms.
 */

.o_pairlayer,
.o_pairlayer_site,
.plw {
    --pl-navy: #062d5d;
    --pl-navy-700: #0a3a73;
    --pl-navy-300: #cfdcea;
    --pl-cyan: #07bdd4;
    --pl-cyan-600: #0596a8;
    --pl-cyan-050: #e7fafd;

    --pl-ink: #0d1b2a;
    --pl-ink-soft: #5b6b7c;
    --pl-ink-faint: #8fa0b0;
    --pl-line: #e4eaf1;
    --pl-line-soft: #f0f4f8;
    --pl-surface: #ffffff;
    --pl-sunken: #f7fafc;

    --pl-ok: #0f9d76;
    --pl-warn: #c67b06;
    --pl-bad: #c0392f;

    --pl-r: 10px;
    --pl-r-sm: 7px;
    --pl-shadow: 0 1px 2px rgba(6, 45, 93, .05), 0 6px 20px rgba(6, 45, 93, .06);
    --pl-lift: 0 2px 4px rgba(6, 45, 93, .06), 0 14px 36px rgba(6, 45, 93, .12);
}

/* ══════════════════════════════════════════════════════ portal header ══ */

.pl-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    margin-bottom: 22px;
    border-radius: var(--pl-r);
    color: #fff;
    box-shadow: var(--pl-shadow);
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(7, 189, 212, .24) 0%, transparent 55%),
        linear-gradient(135deg, var(--pl-navy) 0%, #0b4a86 100%);
}

.pl-header-text { flex: 1; min-width: 0; }

.pl-header h4 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 650;
    letter-spacing: -.01em;
    color: #fff;
}

.pl-header p {
    margin: 3px 0 0;
    font-size: .82rem;
    color: rgba(255, 255, 255, .72);
}

.pl-header-stat {
    flex: 0 0 auto;
    text-align: end;
    padding-inline-start: 18px;
    border-inline-start: 1px solid rgba(255, 255, 255, .16);
}

.pl-header-stat b {
    display: block;
    font: 650 1.25rem/1.15 ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #fff;
}

.pl-header-stat span {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: rgba(255, 255, 255, .6);
}

.pl-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 12px;
}

.pl-section-head h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    color: var(--pl-ink);
}

/* The primary action, in brand rather than Bootstrap blue. */
.o_pairlayer .btn-primary {
    background: var(--pl-navy);
    border-color: var(--pl-navy);
    font-weight: 620;
    border-radius: var(--pl-r-sm);
    padding: 8px 18px;
    box-shadow: 0 1px 2px rgba(6, 45, 93, .18);
    transition: background .15s, box-shadow .15s, transform .1s;
}

.o_pairlayer .btn-primary:hover,
.o_pairlayer .btn-primary:focus {
    background: var(--pl-navy-700);
    border-color: var(--pl-navy-700);
    box-shadow: 0 3px 12px rgba(6, 45, 93, .26);
}

.o_pairlayer .btn-primary:active { transform: translateY(1px); }
.o_pairlayer a { color: var(--pl-cyan-600); }
.o_pairlayer a:hover { color: var(--pl-navy); }

/* ═════════════════════════════════════════════════════ instance list ══ */

.pl-list {
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-r);
    overflow: hidden;
    background: var(--pl-surface);
    box-shadow: var(--pl-shadow);
}

.pl-row { position: relative; }
.pl-row + .pl-row { border-top: 1px solid var(--pl-line-soft); }

/* The cyan edge marks the open row — the live layer, as in the mark. */
.pl-row::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--pl-cyan);
    opacity: 0;
    transition: opacity .18s;
}

.pl-row.is-open::before { opacity: 1; }

.pl-row-head {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border: 0;
    background: transparent;
    text-align: start;
    cursor: pointer;
    transition: background .14s;
}

.pl-row-head:hover { background: var(--pl-sunken); }

.pl-row-head:focus-visible {
    outline: 2px solid var(--pl-cyan);
    outline-offset: -2px;
}

.pl-caret {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--pl-line-soft);
    color: var(--pl-ink-soft);
    font-size: 15px;
    line-height: 1;
    transition: transform .2s, background .14s, color .14s;
}

.pl-row.is-open .pl-caret {
    transform: rotate(90deg);
    background: var(--pl-cyan-050);
    color: var(--pl-cyan-600);
}

.pl-row-names { flex: 1; min-width: 0; }

.pl-row-title {
    display: block;
    font-size: .97rem;
    font-weight: 620;
    letter-spacing: -.005em;
    color: var(--pl-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-row-meta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pl-row-phone {
    font: 400 .82rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--pl-ink-soft);
}

/* One chip, one meaning. Two badges that could both read "Disconnected" told
 * the customer nothing, twice. */
.pl-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 620;
    white-space: nowrap;
}

.pl-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.pl-ok   { background: rgba(15, 157, 118, .1); color: #0b7a5c; border-color: rgba(15, 157, 118, .2); }
.pl-warn { background: rgba(198, 123, 6, .1);  color: #9a5f04; border-color: rgba(198, 123, 6, .2); }
.pl-info { background: var(--pl-cyan-050);     color: var(--pl-cyan-600); border-color: rgba(7, 189, 212, .25); }
.pl-bad  { background: rgba(192, 57, 47, .09); color: #a02c24; border-color: rgba(192, 57, 47, .18); }
.pl-mute { background: var(--pl-line-soft);    color: var(--pl-ink-soft); border-color: var(--pl-line); }

.pl-row-body { display: none; padding: 2px 20px 22px 54px; }
.pl-row.is-open .pl-row-body { display: block; animation: pl-open .2s ease-out; }

@keyframes pl-open {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

.pl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    padding: 16px 18px;
    margin-bottom: 6px;
    border: 1px solid var(--pl-line-soft);
    border-radius: var(--pl-r-sm);
    background: var(--pl-sunken);
}

.pl-field-label {
    margin-bottom: 4px;
    font-size: .71rem;
    font-weight: 620;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--pl-ink-faint);
}

.pl-field-value {
    font: 400 .87rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--pl-ink);
    word-break: break-all;
}

.pl-field-hint { margin-top: 2px; font-size: .72rem; }

.pl-notice {
    margin: 14px 0;
    padding: 12px 16px;
    border-inline-start: 3px solid;
    border-radius: var(--pl-r-sm);
    font-size: .84rem;
    line-height: 1.55;
}

.pl-notice-warn {
    background: rgba(198, 123, 6, .07);
    border-color: var(--pl-warn);
    color: #7a4c03;
}

.pl-empty { padding: 56px 20px; text-align: center; color: var(--pl-ink-faint); }

.pl-empty h5 {
    margin-bottom: 6px;
    font-size: 1.02rem;
    font-weight: 620;
    color: var(--pl-ink-soft);
}

.pl-empty p { margin: 0; font-size: .87rem; }

/* ═══════════════════════════════════════════════════════════ pairing ══ */

.pl-pair {
    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-r);
    background:
        radial-gradient(90% 120% at 0% 0%, var(--pl-cyan-050) 0%, transparent 62%),
        var(--pl-surface);
}

.pl-pair-title {
    margin: 0 0 3px;
    font-size: .95rem;
    font-weight: 650;
    color: var(--pl-navy);
}

.pl-pair-hint { margin: 0 0 14px; font-size: .82rem; color: var(--pl-ink-soft); }

.pl-qr {
    display: block;
    width: 100%;
    max-width: 232px;
    padding: 10px;
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-r-sm);
    background: #fff;
    box-shadow: var(--pl-shadow);
}

.pl-pair-code { margin-top: 12px; display: flex; align-items: baseline; gap: 10px; }
.pl-pair-code span { font-size: .76rem; color: var(--pl-ink-faint); }

.pl-pair-code code {
    font: 650 1.2rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 2px;
    color: var(--pl-navy);
}

.pl-pair-status {
    margin: 14px 0 0;
    min-height: 1.2em;
    font-size: .8rem;
    color: var(--pl-ink-soft);
}

.pl-pair-btn {
    margin-top: 10px;
    padding: 9px 20px;
    border: 0;
    border-radius: var(--pl-r-sm);
    background: var(--pl-cyan);
    color: #04323a;
    font-size: .85rem;
    font-weight: 650;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(7, 189, 212, .3);
    transition: background .15s, color .15s, box-shadow .15s, transform .1s;
}

.pl-pair-btn:hover:not(:disabled) {
    background: var(--pl-cyan-600);
    color: #fff;
    box-shadow: 0 4px 16px rgba(7, 189, 212, .38);
}

.pl-pair-btn:active:not(:disabled) { transform: translateY(1px); }
.pl-pair-btn:disabled { opacity: .55; cursor: default; box-shadow: none; }

/* ══════════════════════════════════════════════════════ signup wizard ══ */

.plw .plw-shell {
    display: grid;
    grid-template-columns: 268px 1fr;
    border: none;
    border-radius: var(--pl-r);
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(6, 45, 93, .3);
}

.plw-rail {
    display: flex;
    flex-direction: column;
    padding: 30px 26px;
    color: rgba(255, 255, 255, .72);
    background-color: var(--pl-navy);
    background-image:
        radial-gradient(130% 100% at 0% 100%, rgba(7, 189, 212, .3) 0%, transparent 58%),
        linear-gradient(160deg, rgba(255, 255, 255, .06) 0%, transparent 60%);
}

.plw-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 34px; }

.plw-brand-mark {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    text-indent: -9999px;
    overflow: hidden;
}

/* Two offset layers, the shape the palette comes from — drawn here rather
 * than shipped as an image, so nothing has to be kept in step with a file. */
.plw-brand-mark::before,
.plw-brand-mark::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.plw-brand-mark::before { top: 6px; left: 5px; background: #fff; opacity: .9; }
.plw-brand-mark::after { top: 13px; left: 14px; background: var(--pl-cyan); }

.plw-brand-text { color: #fff; font-size: .96rem; font-weight: 640; }

.plw-steps { list-style: none; margin: 0; padding: 0; flex: 1; }
.plw-step { display: flex; gap: 15px; padding: 0 0 28px; position: relative; }

.plw-step:not(:last-child)::before {
    content: "";
    position: absolute;
    inset-inline-start: 14px;
    top: 32px;
    bottom: 4px;
    width: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .16);
    transition: background .25s;
}

.plw-step.is-done:not(:last-child)::before { background: var(--pl-cyan); }

.plw-step-n {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: var(--pl-navy);
    font: 640 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    position: relative;
    z-index: 1;
    transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}

.plw-step.is-active .plw-step-n {
    border-color: var(--pl-cyan);
    color: var(--pl-cyan);
    box-shadow: 0 0 0 4px rgba(7, 189, 212, .16);
}

.plw-step.is-done .plw-step-n {
    background: var(--pl-cyan);
    border-color: var(--pl-cyan);
    color: #04323a;
}

.plw-step-label strong {
    display: block;
    font-size: .89rem;
    font-weight: 620;
    color: rgba(255, 255, 255, .55);
    transition: color .2s;
}

.plw-step.is-active .plw-step-label strong,
.plw-step.is-done .plw-step-label strong { color: #fff; }

.plw-step-label small { display: block; font-size: .74rem; line-height: 1.4; opacity: .62; }
.plw-rail-foot { margin: 26px 0 0; font-size: .74rem; line-height: 1.55; opacity: .5; }

.plw-body {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 460px;
    padding: 32px 36px 24px;
    background: var(--pl-surface);
}

.plw-close {
    position: absolute;
    top: 18px;
    inset-inline-end: 20px;
    padding: 0 5px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: var(--pl-ink-faint);
    cursor: pointer;
    transition: color .15s, background .15s;
}

.plw-close:hover { color: var(--pl-ink); background: var(--pl-line-soft); }

.plw-panel { display: none; flex: 1; }
.plw-panel.is-active { display: block; animation: pl-in .24s ease-out; }

@keyframes pl-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .plw-panel.is-active,
    .pl-row.is-open .pl-row-body { animation: none; }
}

.plw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--pl-line);
}

.plw-head h4 {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 660;
    letter-spacing: -.012em;
    color: var(--pl-ink);
}

.plw-chosen { margin: 0; font-size: .83rem; color: var(--pl-ink-soft); }

.plw-cycle { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--pl-line-soft); }
.plw-cycle input { position: absolute; opacity: 0; pointer-events: none; }

.plw-cycle label {
    margin: 0;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 620;
    color: var(--pl-ink-soft);
    cursor: pointer;
    transition: background .18s, color .18s, box-shadow .18s;
}

.plw-cycle input:checked + label {
    background: var(--pl-surface);
    color: var(--pl-navy);
    box-shadow: 0 1px 3px rgba(6, 45, 93, .14);
}

.plw-cycle input:focus-visible + label { outline: 2px solid var(--pl-cyan); }

.plw-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(216px, 1fr));
    gap: 16px;
}

.plw-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px 20px 18px;
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-r);
    background: var(--pl-surface);
    transition: border-color .16s, box-shadow .16s, transform .16s;
}

.plw-plan::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 18px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--pl-cyan);
    opacity: 0;
    transition: opacity .16s;
}

.plw-plan:hover {
    transform: translateY(-3px);
    border-color: var(--pl-navy-300);
    box-shadow: var(--pl-lift);
}

.plw-plan.is-picked { border-color: var(--pl-cyan); box-shadow: var(--pl-lift); }
.plw-plan:hover::before,
.plw-plan.is-picked::before { opacity: 1; }

.plw-plan h5 { margin: 0 0 3px; font-size: 1.03rem; font-weight: 650; color: var(--pl-navy); }
.plw-tagline { margin: 0 0 14px; min-height: 1em; font-size: .79rem; color: var(--pl-ink-soft); }

.plw-price {
    display: flex;
    align-items: baseline;
    gap: 1px;
    margin: 0 0 16px;
    font: 660 1.85rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: -.02em;
    color: var(--pl-ink);
}

.plw-cur { font-size: 1.05rem; color: var(--pl-ink-soft); }

.plw-suffix {
    margin-inline-start: 5px;
    font-family: system-ui, sans-serif;
    font-size: .73rem;
    font-weight: 500;
    color: var(--pl-ink-faint);
}

.plw-features {
    flex: 1;
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    font-size: .81rem;
    color: var(--pl-ink-soft);
}

.plw-features li { position: relative; padding: 4px 0 4px 20px; }

.plw-features li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--pl-cyan);
    opacity: .5;
}

.plw-pick,
.plw-go,
.plw-back {
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--pl-r-sm);
    font-size: .85rem;
    font-weight: 640;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .1s;
}

.plw-pick { width: 100%; background: transparent; border-color: var(--pl-navy-300); color: var(--pl-navy); }

.plw-pick:hover {
    background: var(--pl-navy);
    border-color: var(--pl-navy);
    color: #fff;
    box-shadow: 0 3px 12px rgba(6, 45, 93, .24);
}

.plw-go { background: var(--pl-navy); color: #fff; box-shadow: 0 2px 8px rgba(6, 45, 93, .2); }
.plw-go:hover:not(:disabled) { background: var(--pl-navy-700); box-shadow: 0 4px 16px rgba(6, 45, 93, .3); }
.plw-go:active:not(:disabled) { transform: translateY(1px); }
.plw-go:disabled { opacity: .55; cursor: default; box-shadow: none; }

.plw-back { background: transparent; border-color: var(--pl-line); color: var(--pl-ink-soft); }
.plw-back:hover { border-color: var(--pl-ink-faint); color: var(--pl-ink); }

.plw-terms {
    max-height: 244px;
    overflow-y: auto;
    padding: 18px 20px;
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-r-sm);
    background: var(--pl-sunken);
    font-size: .85rem;
    line-height: 1.65;
    color: var(--pl-ink-soft);
}

.plw-terms p:last-child { margin-bottom: 0; }

.plw-agree {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 18px 0 0;
    padding: 13px 16px;
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-r-sm);
    font-size: .87rem;
    color: var(--pl-ink);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.plw-agree:hover { border-color: var(--pl-navy-300); background: var(--pl-sunken); }
.plw-agree input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--pl-cyan); }

.plw-sign { margin-top: 18px; }

.plw-sign-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    font-size: .78rem;
    font-weight: 620;
    color: var(--pl-ink-soft);
}

.plw-link {
    padding: 0;
    border: 0;
    background: none;
    font-size: .78rem;
    color: var(--pl-cyan-600);
    cursor: pointer;
    text-decoration: underline;
}

.plw-pad {
    display: block;
    width: 100%;
    height: 152px;
    border: 1.5px dashed var(--pl-navy-300);
    border-radius: var(--pl-r-sm);
    background: var(--pl-sunken);
    touch-action: none;
    cursor: crosshair;
}

.plw-input {
    width: 100%;
    margin-top: 11px;
    padding: 10px 14px;
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-r-sm);
    font-size: .86rem;
}

.plw-input:focus {
    outline: none;
    border-color: var(--pl-cyan);
    box-shadow: 0 0 0 3px rgba(7, 189, 212, .15);
}

.plw-result { padding: 30px 0 12px; text-align: center; }

.plw-result-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--pl-cyan-050);
    color: var(--pl-cyan-600);
    font-size: 27px;
    box-shadow: 0 0 0 8px rgba(7, 189, 212, .08);
}

.plw-result h4 { margin: 0 0 7px; font-size: 1.2rem; font-weight: 660; color: var(--pl-ink); }

.plw-result p {
    max-width: 470px;
    margin: 0 auto 8px;
    font-size: .87rem;
    line-height: 1.65;
    color: var(--pl-ink-soft);
}

.plw-next {
    max-width: 470px;
    margin: 22px auto 0;
    padding: 18px 22px;
    list-style: none;
    text-align: start;
    border: 1px solid var(--pl-line-soft);
    border-radius: var(--pl-r-sm);
    background: var(--pl-sunken);
    font-size: .84rem;
    color: var(--pl-ink-soft);
}

.plw-next li { position: relative; padding: 5px 0 5px 24px; }

.plw-next li::before {
    content: "\2192";
    position: absolute;
    inset-inline-start: 0;
    font-weight: 700;
    color: var(--pl-cyan-600);
}

.plw-pay {
    display: inline-block;
    margin-top: 20px;
    padding: 11px 26px;
    border-radius: var(--pl-r-sm);
    background: var(--pl-navy);
    color: #fff;
    font-size: .88rem;
    font-weight: 640;
    text-decoration: none;
    box-shadow: 0 3px 14px rgba(6, 45, 93, .26);
}

.plw-pay:hover { background: var(--pl-navy-700); color: #fff; }

.plw-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--pl-line);
}

.plw-foot-right { display: flex; gap: 10px; }

.plw-err {
    margin: 14px 0 0;
    padding: 10px 14px;
    border-inline-start: 3px solid var(--pl-bad);
    border-radius: var(--pl-r-sm);
    background: rgba(192, 57, 47, .07);
    font-size: .83rem;
    color: #a02c24;
}

.plw-spin {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-inline-end: 8px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pl-spin .7s linear infinite;
    vertical-align: -2px;
}

@keyframes pl-spin { to { transform: rotate(360deg); } }

.plw-note { font-size: .86rem; color: var(--pl-ink-soft); }

/* ═════════════════════════════════════════════════════════════════ docs ══ */

/* A reference page is read by someone with a terminal open beside it, mid-task
 * and slightly annoyed. Everything here serves scanning: one column, a sticky
 * index, monospace for anything that gets typed, and the verb of each endpoint
 * coloured so the eye can find the POSTs without reading. */

.o_pairlayer_docs { max-width: 900px; }

.pld-toc {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 26px;
    padding: 9px 4px;
    background: var(--pl-surface);
    border-bottom: 1px solid var(--pl-line);
}

.pld-toc a {
    padding: 5px 11px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 560;
    color: var(--pl-ink-soft);
    text-decoration: none;
    transition: background .14s, color .14s;
}

.pld-toc a:hover,
.pld-toc a:focus {
    background: var(--pl-cyan-050);
    color: var(--pl-cyan-600);
    text-decoration: none;
}

.pld-section {
    padding-bottom: 8px;
    /* The sticky index would otherwise sit on top of the heading it just
     * jumped to. */
    scroll-margin-top: 62px;
}

.pld-section + .pld-section { border-top: 1px solid var(--pl-line-soft); }

.pld-h6 {
    margin: 24px 0 10px;
    font-size: .82rem;
    font-weight: 660;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pl-ink-faint);
}

.pld-lead {
    margin: 0 0 14px;
    font-size: .92rem;
    line-height: 1.62;
    color: var(--pl-ink);
}

.pld-note {
    margin: 12px 0 0;
    font-size: .85rem;
    line-height: 1.62;
    color: var(--pl-ink-soft);
}

.pld-list {
    margin: 0;
    padding-inline-start: 20px;
    font-size: .87rem;
    line-height: 1.62;
    color: var(--pl-ink-soft);
}

.pld-list li { margin-bottom: 9px; }
.pld-list li::marker { color: var(--pl-cyan); }

.o_pairlayer_docs code {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--pl-line-soft);
    font-size: .85em;
    color: var(--pl-navy);
}

.pld-field { margin-bottom: 4px; }

.pld-code {
    margin: 12px 0 0;
    padding: 15px 17px;
    overflow-x: auto;
    border: 1px solid var(--pl-line);
    border-inline-start: 3px solid var(--pl-cyan);
    border-radius: var(--pl-r-sm);
    background: var(--pl-sunken);
    font-size: .82rem;
    line-height: 1.62;
    /* Samples are copied and pasted; a code block that reflows breaks them. */
    white-space: pre;
    direction: ltr;
    text-align: start;
}

.pld-code code {
    padding: 0;
    background: none;
    color: var(--pl-ink);
    font-size: inherit;
}

/* ── tables ── */

.pld-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: .86rem;
}

.pld-table thead th {
    padding: 9px 12px;
    border-bottom: 1px solid var(--pl-line);
    font-size: .71rem;
    font-weight: 660;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--pl-ink-faint);
    text-align: start;
    white-space: nowrap;
}

.pld-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--pl-line-soft);
    vertical-align: top;
    line-height: 1.5;
    color: var(--pl-ink-soft);
}

.pld-table tbody tr:hover { background: var(--pl-sunken); }
.pld-table td:first-child { color: var(--pl-ink); white-space: nowrap; }

.pld-table-routes td { padding-block: 7px; }
.pld-method { width: 1%; }
.pld-path { width: 1%; white-space: nowrap; }
.pld-path code { background: none; padding: 0; font-weight: 560; }
.pld-summary { color: var(--pl-ink-soft); }
.pld-scope { width: 1%; text-align: end; white-space: nowrap; }
.pld-scope code { font-size: .75em; }

.pld-verb {
    display: inline-block;
    min-width: 46px;
    padding: 2px 7px;
    border-radius: 4px;
    font: 660 .68rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .04em;
    text-align: center;
}

.pld-verb-get { background: var(--pl-cyan-050); color: var(--pl-cyan-600); }
.pld-verb-post { background: rgba(6, 45, 93, .08); color: var(--pl-navy); }

.pld-events code { display: inline-block; margin: 0 3px 3px 0; font-size: .75em; }

/* ── the two endpoint flags ── */

.pld-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 6px;
    font-size: .8rem;
    color: var(--pl-ink-soft);
}

.pld-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-inline-start: 5px;
    border-radius: 4px;
    font: 660 .64rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    font-style: normal;
    vertical-align: 1px;
}

.pld-legend .pld-flag { margin-inline: 0 6px; }
.pld-flag-idem { background: rgba(15, 157, 118, .12); color: #0b7a5c; }
.pld-flag-conn { background: rgba(198, 123, 6, .12); color: #9a5f04; }

/* ══════════════════════════════════════════════════════════ public site ══ */

/* The pricing page is the first thing a stranger sees, and it was Bootstrap's
 * default card three times over. It now speaks the same language as the portal
 * they will land in: navy for structure, cyan only on the thing being attended
 * to — here, the plan the pointer is over. */

.o_pairlayer_site { color: var(--pl-ink); }

.pls-hero {
    padding: 60px 0 66px;
    color: #fff;
    background:
        radial-gradient(90% 120% at 88% -10%, rgba(7, 189, 212, .3) 0%, transparent 58%),
        linear-gradient(135deg, var(--pl-navy) 0%, #0b4a86 100%);
}

.pls-hero-inner { max-width: 720px; }

.pls-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 13px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 640;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
}

.pls-hero h1 {
    margin: 0;
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    font-weight: 680;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: #fff;
}

.pls-hero p {
    margin: 16px 0 0;
    max-width: 60ch;
    font-size: 1.02rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .75);
}

.pls-section { padding: 54px 0; }
.pls-section-sunken { background: var(--pl-sunken); border-top: 1px solid var(--pl-line); }

/* ── plans ── */

.pls-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
    gap: 22px;
    align-items: stretch;
}

.pls-plan {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-r);
    background: var(--pl-surface);
    box-shadow: var(--pl-shadow);
    transition: box-shadow .18s, transform .18s, border-color .18s;
}

/* The cyan edge, again: it marks the card being considered, and nothing here
 * is labelled "recommended" — that would be a claim, not a style. */
.pls-plan::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 3px;
    background: var(--pl-cyan);
    transform: scaleX(0);
    transition: transform .2s ease-out;
}

.pls-plan:hover,
.pls-plan:focus-within {
    transform: translateY(-3px);
    border-color: var(--pl-navy-300);
    box-shadow: var(--pl-lift);
}

.pls-plan:hover::before,
.pls-plan:focus-within::before { transform: scaleX(1); }

.pls-plan-body { flex: 1; padding: 26px 24px 20px; }

.pls-plan h4 {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 660;
    letter-spacing: -.01em;
    color: var(--pl-navy);
}

.pls-plan-tagline {
    margin: 5px 0 20px;
    font-size: .86rem;
    line-height: 1.5;
    color: var(--pl-ink-soft);
}

.pls-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 8px;
    padding-top: 18px;
    border-top: 1px solid var(--pl-line-soft);
}

.pls-price-symbol {
    font-size: 1.05rem;
    font-weight: 620;
    color: var(--pl-ink-soft);
    align-self: flex-start;
    margin-top: 6px;
}

.pls-price-amount {
    font: 680 2.35rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: -.03em;
    color: var(--pl-navy);
}

.pls-price-unit {
    flex: 1 0 100%;
    margin-top: 4px;
    font-size: .76rem;
    letter-spacing: .02em;
    color: var(--pl-ink-faint);
}

.pls-price-alt {
    margin: 10px 0 0;
    font-size: .82rem;
    color: var(--pl-ink-soft);
}

.pls-features {
    margin: 20px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--pl-line-soft);
    list-style: none;
}

.pls-features li {
    position: relative;
    padding-inline-start: 26px;
    margin-bottom: 10px;
    font-size: .87rem;
    line-height: 1.45;
    color: var(--pl-ink);
}

/* Drawn, not an icon font: the page must not depend on FontAwesome loading to
 * be readable, and a tick that fails to load leaves a list of orphan phrases. */
.pls-features li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: .34em;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--pl-cyan-050);
}

.pls-features li::after {
    content: "";
    position: absolute;
    inset-inline-start: 5px;
    top: .52em;
    width: 4px;
    height: 7px;
    border: solid var(--pl-cyan-600);
    border-width: 0 1.6px 1.6px 0;
    transform: rotate(45deg);
}

.pls-plan-foot { padding: 0 24px 26px; }

/* ── the three notes, and the one warning ── */

.pls-notes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 26px;
}

.pls-note h5 {
    position: relative;
    margin: 0 0 10px;
    padding-top: 14px;
    font-size: .97rem;
    font-weight: 650;
    color: var(--pl-navy);
}

.pls-note h5::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--pl-cyan);
}

.pls-note p {
    margin: 0;
    font-size: .88rem;
    line-height: 1.62;
    color: var(--pl-ink-soft);
}

.pls-warning {
    margin-top: 34px;
    padding: 18px 20px;
    border: 1px solid rgba(198, 123, 6, .28);
    border-inline-start: 3px solid var(--pl-warn);
    border-radius: var(--pl-r-sm);
    background: #fffaf0;
    font-size: .87rem;
    line-height: 1.62;
    color: #6b4a08;
}

.pls-warning strong { display: block; margin-bottom: 4px; color: #7a5203; }

/* ════════════════════════════════════════════════════════════ narrow ══ */

@media (max-width: 767.98px) {
    .pld-toc { position: static; margin-bottom: 18px; }
    .pld-table-routes .pld-scope { display: none; }

    .pls-hero { padding: 40px 0 44px; }
    .pls-section { padding: 36px 0; }
    .pls-plans, .pls-notes { grid-template-columns: 1fr; }

    .pl-header { flex-wrap: wrap; padding: 16px 18px; }
    .pl-header-stat { padding-inline-start: 0; border: 0; text-align: start; }

    .plw .plw-shell { grid-template-columns: 1fr; }
    .plw-rail { padding: 18px 20px; }
    .plw-brand { margin-bottom: 16px; }
    .plw-rail-foot { display: none; }

    .plw-steps { display: flex; gap: 18px; }
    .plw-step { flex: 1; padding: 0; }
    .plw-step::before { display: none; }
    .plw-step-label small { display: none; }

    .plw-body { min-height: 0; padding: 22px 20px 16px; }
    .plw-plans { grid-template-columns: 1fr; }

    .pl-row-body { padding-inline: 18px; }
    .pl-row-meta { gap: 8px; }
    .pl-row-phone { display: none; }
}

/* Right-to-left: only the caret and the arrow are directional — everything
 * else uses logical properties and mirrors on its own. */
[dir="rtl"] .pl-caret { transform: rotate(180deg); }
[dir="rtl"] .pl-row.is-open .pl-caret { transform: rotate(90deg); }
[dir="rtl"] .plw-next li::before { content: "\2190"; }
[dir="rtl"] .pls-features li::after { transform: rotate(45deg); }
