/* ============================================================================
   Polish (owner request, 6 November 2026: "very modern, easy to navigate and
   use"). Loaded last, after every other stylesheet, so it refines rather than
   replaces: depth on cards and buttons, hover feedback on everything that can
   be clicked, a soft light behind the signed-out pages, and the home page and
   trial sign-up layouts. Uses the tokens only; no new colours, so the contrast
   rules in tokens.css still hold. Motion respects prefers-reduced-motion.
   ========================================================================== */

/* ---------- light and depth ---------- */

/* A soft amber glow at the top of the signed-out pages: warmth without colour on the content. */
.fx {
    background:
        radial-gradient(1100px 420px at 50% -120px, rgba(var(--sip-amber-rgb), 0.08), transparent 70%),
        var(--sip-canvas);
}

/* The workspace keeps a quieter version, behind the page header. */
.app {
    background:
        radial-gradient(900px 300px at 70% -140px, rgba(var(--sip-amber-rgb), 0.045), transparent 70%),
        var(--sip-canvas);
}

/* Cards catch a little light along the top edge and sit slightly above the page. */
.sip-card,
.sip-stat,
.adm-stat,
.fx-panel,
.fx-door {
    background-image: linear-gradient(180deg, rgba(var(--sip-text-rgb), 0.025), rgba(var(--sip-text-rgb), 0) 120px);
    box-shadow: 0 1px 0 rgba(var(--sip-text-rgb), 0.03) inset, 0 10px 30px -18px rgba(0, 0, 0, 0.18);
}

.fx-panel {
    box-shadow: 0 1px 0 rgba(var(--sip-text-rgb), 0.04) inset, 0 24px 60px -28px rgba(0, 0, 0, 0.22);
}

/* ---------- things that can be clicked ---------- */

a.sip-stat,
a.sip-card,
.fx-door-link {
    transition: transform var(--dur) var(--ease), border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

    a.sip-stat:hover,
    a.sip-card:hover,
    .fx-door-link:hover {
        transform: translateY(-2px);
        border-color: var(--sip-line-strong);
    }

/* The primary action lifts a little and glows on hover. */
.btn-primary,
.fx-btn-primary {
    transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

    .btn-primary:hover:not(:disabled),
    .fx-btn-primary:hover:not([disabled]) {
        box-shadow: 0 8px 22px -8px rgba(var(--sip-amber-rgb), 0.55);
        transform: translateY(-1px);
    }

    .btn-primary:active:not(:disabled),
    .fx-btn-primary:active:not([disabled]) {
        transform: translateY(0);
        box-shadow: none;
    }

/* Table rows answer the pointer, so a long list is easy to follow across. */
.table > tbody > tr {
    transition: background-color var(--dur-fast) ease;
}

    .table > tbody > tr:hover > * {
        background-color: rgba(var(--sip-text-rgb), 0.035);
    }

/* Fields show a soft halo when focused, as well as the keyboard ring. */
.form-control:focus,
.form-select:focus,
.fx-input:focus {
    box-shadow: 0 0 0 4px rgba(var(--sip-text-rgb), 0.07);
}

/* ---------- the home page ---------- */

.fx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px 0;
    padding: 5px 12px;
    border: 1px solid var(--sip-hairline);
    border-radius: var(--radius-pill);
    background: rgba(var(--sip-text-rgb), 0.03);
    color: var(--sip-text-2);
    font-size: var(--text-sm);
    font-weight: 500;
}

.fx-eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sip-amber);
    box-shadow: 0 0 0 4px rgba(var(--sip-amber-rgb), 0.15);
}

.fx-home-title {
    font-size: clamp(1.9rem, 4.2vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
    max-width: 22ch;
}

.fx-door-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 12px;
    background: rgba(var(--sip-text-rgb), 0.05);
    border: 1px solid var(--sip-hairline);
    color: var(--sip-text);
}

    .fx-door-icon svg {
        width: 22px;
        height: 22px;
    }

.fx-door.fx-door-feature .fx-door-icon {
    background: rgba(var(--sip-amber-rgb), 0.14);
    border-color: rgba(var(--sip-amber-rgb), 0.35);
    color: var(--sip-amber-text);
}

.fx-door.fx-door-feature {
    border-color: rgba(var(--sip-amber-rgb), 0.28);
    background-image: linear-gradient(120deg, rgba(var(--sip-amber-rgb), 0.07), rgba(var(--sip-amber-rgb), 0) 60%);
}

    .fx-door.fx-door-feature .fx-door-text {
        flex: 1;
    }

.fx-door-link {
    color: var(--sip-text);
    text-decoration: none;
}

    .fx-door-link:hover {
        color: var(--sip-text);
    }

.fx-door-go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 0.6rem;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--sip-text);
}

    .fx-door-go svg {
        width: 16px;
        height: 16px;
        transition: transform var(--dur) var(--ease);
    }

    .fx-door-link:hover .fx-door-go svg {
        transform: translateX(3px);
    }

.fx-home-help {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin-top: 28px;
}

    .fx-home-help a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--sip-text-2);
        font-size: var(--text-sm);
        text-decoration: none;
    }

        .fx-home-help a:hover {
            color: var(--sip-text);
        }

    .fx-home-help svg {
        width: 16px;
        height: 16px;
    }

@media (max-width: 640px) {
    .fx-door.fx-door-feature {
        flex-direction: column;
        align-items: flex-start;
    }

        .fx-door.fx-door-feature .fx-btn {
            align-self: stretch;
        }
}

/* ---------- the trial sign-up: what's included ---------- */

@media (min-width: 821px) {
    .fx-panel.has-figure:has(.fx-art) {
        max-width: 1040px;
        grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    }

    .fx-panel.has-figure:has(.fx-included) {
        align-items: start;
        grid-template-columns: minmax(0, 1fr) 380px;
    }
}

.fx-figure-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.fx-included {
    width: 100%;
    padding: 22px;
    border: 1px solid var(--sip-hairline);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(var(--sip-amber-rgb), 0.06), rgba(var(--sip-amber-rgb), 0) 70%), var(--sip-surface);
}

    .fx-included h2 {
        margin: 0 0 14px 0;
        font-size: var(--text-md);
        font-weight: 600;
    }

    .fx-included ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .fx-included li {
        display: flex;
        gap: 10px;
        align-items: flex-start;
        color: var(--sip-text-2);
        font-size: var(--text-sm);
        line-height: 1.5;
    }

        .fx-included li strong {
            color: var(--sip-text);
            font-weight: 600;
        }

        .fx-included li svg {
            flex: none;
            width: 18px;
            height: 18px;
            margin-top: 1px;
            padding: 3px;
            border-radius: 50%;
            background: rgba(var(--sip-success-rgb), 0.16);
            color: var(--sip-success);
        }

    .fx-included p {
        margin: 16px 0 0 0;
        color: var(--sip-muted);
        font-size: var(--text-sm);
    }

/* ---------- in-theme artwork (PortalArt) ---------- */

.fx-art {
    width: 100%;
    margin: 0;
}

    .fx-art img {
        display: block;
        width: 100%;
        height: auto;
    }

/* On a phone the picture comes after the step: kept to a modest size so it doesn't feel like a second page. */
@media (max-width: 820px) {
    .fx-art {
        max-width: 400px;
        margin-inline: auto;
    }
}

/* Long addresses and codes in running text wrap on a narrow screen instead of pushing the page sideways. */
.fx-faq .fx-mono,
.fx-note .fx-mono {
    overflow-wrap: anywhere;
}

/* ---------- the way back to the website, in the portal's own header and the wizard's ---------- */

.fx-top-site {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

    .fx-top-site svg {
        width: 16px;
        height: 16px;
        flex: none;
    }

/* ---------- Help: the support email address, first and prominent ---------- */

.fx-help-email {
    margin-bottom: 1rem;
    border-color: rgba(var(--sip-amber-rgb), 0.4);
    background: linear-gradient(180deg, rgba(var(--sip-amber-rgb), 0.08), rgba(var(--sip-amber-rgb), 0) 80%), var(--fx-raise);
}

    .fx-help-email a {
        font-size: 1.05rem;
        overflow-wrap: anywhere;
    }

/* ---------- "Before your first search" (FirstSearchNote) ---------- */

.fx-first-search {
    margin-top: 1rem;
    border-color: rgba(var(--sip-amber-rgb), 0.35);
}

    .fx-first-search ul {
        margin: 0.4rem 0 0 0;
        padding-left: 1.1rem;
    }

    .fx-first-search li + li {
        margin-top: 0.35rem;
    }

/* ---------- "SIP for IT and security teams" prints as a plain document ---------- */

@media print {
    html:has(.fx-it-page),
    html:has(.fx-it-page) body,
    html:has(.fx-it-page) .fx {
        background: #fff !important;
        color: #111 !important;
    }

    html:has(.fx-it-page) .fx-top,
    html:has(.fx-it-page) .fx-skip {
        display: none !important;
    }

    .fx-it-page,
    .fx-it-page * {
        color: #111 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .fx-it-page a {
        text-decoration: underline;
    }

    .fx-it-page .fx-faq {
        break-inside: avoid;
        border-top-color: #ccc !important;
        padding: 0.8rem 0;
    }
}

/* ---------- the operator's editing tables (plans, price brackets) on a phone ----------
   Each row becomes a small card: the first field across the top, the others two to a line, each with
   its label above it. */

@media (max-width: 640px) {
    table.set-plans,
    table.set-plans > tbody,
    table.set-brackets,
    table.set-brackets > tbody {
        display: block;
        width: 100%;
    }

        table.set-plans > thead,
        table.set-brackets > thead {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
        }

        table.set-plans > tbody > tr,
        table.set-brackets > tbody > tr {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.6rem 0.75rem;
            padding: 0.9rem 0;
            border-bottom: 1px solid var(--sip-hairline);
        }

            table.set-plans > tbody > tr > td,
            table.set-brackets > tbody > tr > td {
                display: block;
                min-width: 0;
                padding: 0 !important;
                border: 0;
                text-align: left !important;
            }

                table.set-plans > tbody > tr > td[data-label]::before,
                table.set-brackets > tbody > tr > td[data-label]::before {
                    content: attr(data-label);
                    display: block;
                    margin-bottom: 4px;
                    color: var(--sip-muted);
                    font-size: 0.75rem;
                    font-weight: 500;
                }

            table.set-plans > tbody > tr > td:first-child {
                grid-column: 1 / -1;
            }

            table.set-plans input.form-control,
            table.set-brackets input.form-control {
                width: 100%;
                max-width: none;
            }
}

/* ---------- filter tabs on a phone ----------
   Stretching each tab to fill its row made an uneven grid on a narrow screen. On a phone they keep
   their own width and wrap as a tidy row of chips, starting at the left. */

@media (max-width: 640px) {
    .seg {
        width: 100%;
        justify-content: flex-start;
        gap: 4px;
    }

        .seg > button,
        .seg > a,
        .seg-btn {
            flex: 0 0 auto;
            min-height: 36px;
        }
}

/* ---------- onboarding (ChatGPT review of the trial screens, 7 November 2026) ---------- */

/* "Your details" and "Your agency" over the trial account form. */
.fx-form-group {
    margin: 1.6rem 0 0.9rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--sip-hairline);
    color: var(--sip-text);
    font-size: 1rem;
    font-weight: 600;
}

    .fx-form-group:first-of-type {
        margin-top: 0.4rem;
        padding-top: 0;
        border-top: 0;
    }

/* "Already have an account? Sign in": readable, with a comfortable tap target. */
.fx-signin-instead {
    color: var(--sip-text-2);
}

    .fx-signin-instead a {
        display: inline-block;
        padding: 0.55rem 0.25rem;
        margin: -0.55rem 0;
        color: var(--sip-text);
        font-weight: 600;
    }

/* "Change email address" under the verify step's lead. */
.fx-change-email {
    margin: -0.35rem 0 1.25rem !important;
    font-size: 0.92rem;
}

    .fx-change-email a {
        display: inline-block;
        padding: 0.4rem 0;
        color: var(--sip-text);
        font-weight: 600;
    }

/* The one-line "what happens next" under a step's choices. */
.fx-next-hint {
    margin-top: 1.1rem !important;
}

/* Resend and "Didn't receive the email?" on the verify step: brighter than footnotes. */
.fx-verify-help .sip-resend:not([disabled]),
.fx-verify-help summary {
    color: var(--sip-text);
}

.fx-verify-help .sip-resend[disabled] {
    color: var(--sip-text-2);
    opacity: 1;
}

.fx-verify-help summary {
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Trial › Activate: devices used and when the trial ends, readable at a glance. */
.fx-progress-line {
    margin: -0.25rem 0 1.25rem !important;
    color: var(--sip-text-2);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Shown only where the step's illustration is hidden (a phone). */
.fx-when-narrow {
    display: none;
}

@media (max-width: 820px) {
    .fx-when-narrow {
        display: block;
    }
}

/* The cropped device-code picture above the field on a phone. */
.fx-device-crop {
    margin: 0 0 1.1rem;
}

.fx-device-crop-screen {
    display: grid;
    gap: 10px;
    padding: 12px 14px 14px;
    border: 1px solid var(--fx-line-strong);
    border-radius: 16px;
    background: #111215;
    font-size: 12px;
    line-height: 1.35;
    user-select: none;
}

    .fx-device-crop-screen .fx-device-title {
        font-size: 15px;
    }

    .fx-device-crop-screen .fx-device-label {
        font-size: 11px;
    }

    .fx-device-crop-screen .fx-device-code {
        font-size: 16px;
    }

/* Trial › activation code on a phone: which device the code is for, above Copy. */
.fx-code-for {
    margin: 0 0 0.6rem !important;
    color: var(--sip-text-2);
    font-size: 0.95rem;
}

    .fx-code-for .fx-mono {
        color: var(--sip-text);
    }

/* "Download for iPhone or iPad" in full on a phone, where the card is full width; beside each other the
   card already names the device, so only "Download" shows (screen readers still hear it all). */
@media (min-width: 561px) {
    .fx-choice-go-for {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/* Device choices on a phone: shorter cards, the icon smaller. */
@media (max-width: 560px) {
    .fx-choice-icon {
        width: 30px;
        height: 30px;
        margin-bottom: 0.3rem;
    }

    .fx a.fx-choice,
    .fx div.fx-choice {
        padding: 1rem 1rem 1rem;
    }

    .fx-choice-go {
        margin-top: 0.6rem;
    }
}

/* Install steps: room between the download button and the numbered steps. */
.fx-install .fx-numbered {
    margin-top: 1.4rem;
}

/* Trial › activation code on a computer: the QR code leads; the long code is there to copy, not to read. */
.fx-code-quiet .sip-actcode-text {
    color: var(--sip-text-2);
    font-size: 0.8rem;
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    a.sip-stat,
    a.sip-card,
    .fx-door-link,
    .btn-primary,
    .fx-btn-primary,
    .fx-door-go svg {
        transition: none;
    }

        a.sip-stat:hover,
        a.sip-card:hover,
        .fx-door-link:hover,
        .btn-primary:hover:not(:disabled),
        .fx-btn-primary:hover:not([disabled]) {
            transform: none;
        }
}

/* Trial › Activate: "Where do I find my device code?" under the field — part of the field, so no rule above it. */
.fx-help.fx-code-where {
    margin-top: 0.4rem;
    border-top: 0;
    padding-top: 0;
}

    .fx-help.fx-code-where summary {
        min-height: 44px;
        display: flex;
        align-items: center;
        color: var(--sip-text);
    }

    .fx-help.fx-code-where ul {
        margin-top: 0.2rem;
    }
