/* ============================================================================
   Refresh (November 2026): a modernising pass over every page — the public
   front door and footer, the trial set-up, the signed-in workspace and the
   operator console. Loaded last, after polish.css, so it refines what is there.

   Same rules as the rest of the design system: the tokens only (no new
   colours), amber kept for the one primary action, sentence case, 44px+
   targets, grids that never ask for more than the screen has, and motion off
   for people who ask.
   ========================================================================== */

/* ---------- the public footer (PortalFooter) ---------- */

.fx-foot {
    margin-top: auto;
    border-top: 1px solid var(--sip-hairline);
    background: rgba(var(--sip-text-rgb), 0.012);
}

.fx-foot-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    max-width: calc(1120px + 2 * var(--fx-gutter, 24px));
    margin: 0 auto;
    padding: 1.25rem var(--fx-gutter, 24px) calc(1.25rem + env(safe-area-inset-bottom, 0px));
}

.fx-foot-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--sip-muted);
    font-size: var(--text-sm);
}

.fx-foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
}

    .fx .fx-foot-links a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        color: var(--sip-text-2);
        font-size: var(--text-sm);
        text-decoration: none;
    }

        .fx .fx-foot-links a:hover {
            color: var(--sip-text);
            text-decoration: underline;
            text-underline-offset: 3px;
        }

@media (max-width: 640px) {
    .fx-foot-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* ---------- the front door (Home) ---------- */

.fx-main-home {
    padding-top: clamp(28px, 6vw, 72px);
}

.fx-main-home .fx-home {
    max-width: 1120px;
}

/* The trial beside a picture of SIP itself. */
.fx-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
    margin-bottom: clamp(40px, 7vw, 80px);
}

    .fx-hero .fx-lead {
        font-size: 1.12rem;
        margin-bottom: 1.6rem !important;
    }

.fx-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

    .fx-hero-actions .fx-btn {
        min-width: 160px;
    }

.fx-hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    margin: 1.4rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--sip-text-2);
    font-size: var(--text-sm);
}

    .fx-hero-facts li {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
    }

    .fx-hero-facts svg {
        width: 16px;
        height: 16px;
        color: var(--sip-success);
    }

.fx-hero-figure {
    position: relative;
}

    /* A soft pool of light under the devices, so they sit on the page rather than float. */
    .fx-hero-figure::before {
        content: "";
        position: absolute;
        inset: 12% 6% 0;
        border-radius: 50%;
        background: radial-gradient(closest-side, rgba(var(--sip-text-rgb), 0.07), transparent);
        filter: blur(8px);
        z-index: 0;
    }

    .fx-hero-figure .fx-art {
        position: relative;
        z-index: 1;
    }

/* "How the free trial works": three numbered steps in a row. */
.fx-section-title {
    margin: 0 0 1.1rem;
    font-size: var(--text-lg);
    font-weight: 600;
}

.fx-howto {
    margin-bottom: clamp(32px, 6vw, 56px);
}

.fx-howto-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

    .fx-howto-steps li {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 0.9rem;
        padding: 1.25rem;
        border: 1px solid var(--sip-hairline);
        border-radius: 14px;
        background: var(--sip-surface);
    }

    .fx-howto-steps h3 {
        margin: 0.25rem 0 0.35rem;
        font-size: var(--text-md);
        font-weight: 600;
    }

    .fx-howto-steps p {
        color: var(--sip-text-2);
        font-size: var(--text-sm);
        line-height: 1.55;
    }

.fx-howto-num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--sip-line-strong);
    background: var(--sip-canvas);
    color: var(--sip-text);
    font-size: var(--text-sm);
    font-weight: 600;
}

/* The other doors, three across. */
.fx-doors.fx-doors-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .fx-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .fx-hero-figure {
        max-width: 520px;
        margin-inline: auto;
        width: 100%;
    }

    .fx-howto-steps,
    .fx-doors.fx-doors-three {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .fx-hero-actions .fx-btn {
        flex: 1 1 100%;
    }
}

/* ---------- the trial set-up ---------- */

/* "Wrong address? Change email address": one quiet line under the verify step's lead. */
.fx-change-email {
    color: var(--sip-text-2);
}

    .fx-change-email a {
        font-weight: 500;
        text-decoration: underline;
        text-decoration-color: var(--sip-line-strong);
        text-underline-offset: 3px;
    }

/* The "Your trial is ready" step: room between the meter and the next steps. */
.fx-meter + .fx-h2 {
    margin-top: 1.5rem;
}

/* ---------- Help: email and the guide as two cards ---------- */

.fx-help-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 0 0 2rem;
}

.fx-help-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.4rem;
    border: 1px solid var(--sip-hairline);
    border-radius: 14px;
    background: var(--sip-surface);
}

    .fx-help-card h2 {
        margin: 0.35rem 0 0;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .fx-help-card p {
        color: var(--sip-text-2);
        line-height: 1.55;
    }

    .fx-help-card a strong {
        overflow-wrap: anywhere;
    }

.fx-help-card-actions {
    margin-top: auto;
    padding-top: 0.75rem;
}

@media (max-width: 720px) {
    .fx-help-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .fx-help-card-actions .fx-btn {
        width: 100%;
    }
}

.fx-help-cards .fx-help-email {
    margin-bottom: 0;
}

/* On a phone the three doors become compact rows: the icon beside the title and text. */
@media (max-width: 560px) {
    .fx-doors.fx-doors-three .fx-door {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 0.3rem;
        padding: 1.1rem;
    }

    .fx-doors.fx-doors-three .fx-door-icon {
        grid-row: 1 / span 3;
    }

    .fx-doors.fx-doors-three .fx-door-go {
        padding-top: 0.2rem;
    }

    .fx-howto-steps li {
        padding: 1rem;
    }
}

/* Help: the three topic groups side by side on a wide screen, so none sits alone on a second row. */
@media (min-width: 821px) {
    .fx-help-page .fx-toc-groups {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- sign-in: the panel beside the email step ---------- */

.fx-signin-aside {
    display: grid;
    gap: 1rem;
    width: 100%;
    align-self: stretch;
}

.fx-signin-aside-block {
    padding: 1.2rem;
    border: 1px solid var(--sip-hairline);
    border-radius: 14px;
    background: var(--fx-raise, #16181B);
}

    .fx-signin-aside-block h2 {
        margin: 0 0 0.4rem;
        font-size: var(--text-md);
        font-weight: 600;
    }

    .fx-signin-aside-block p {
        color: var(--sip-text-2);
        font-size: var(--text-sm);
        line-height: 1.55;
    }

    .fx-signin-aside-block .fx-btn {
        margin-top: 0.9rem;
        min-height: 44px;
    }

.fx-panel.has-figure:has(.fx-signin-aside) {
    max-width: 860px;
    align-items: start;
}

/* ==========================================================================
   The signed-in workspace
   ========================================================================== */

/* A figure that opens its list: the chevron sits beside the number, not over the label, so a label
   like "Expiring within 30 days" keeps the card's full width and stays on one line. */
a.sip-stat {
    padding-right: 1.1rem;
}

.sip-stat-go {
    top: auto;
    bottom: 1.15rem;
}

/* Device codes ("ABCD-1234") never break at the hyphen. */
.sip-code {
    white-space: nowrap;
}

/* List toolbars: the search keeps room for its hint ("Search by device code, device name…"); the
   filter segments wrap under it rather than squeezing it. */
.sip-toolbar-search {
    min-width: min(22rem, 100%);
    max-width: 28rem;
}

/* A date in a table cell ("29 Nov 2026") stays on one line. */
.table time {
    white-space: nowrap;
}

.sip-toolbar-input::placeholder {
    text-overflow: ellipsis;
}

/* A page's actions on a phone: the primary action across the full width, then the other buttons and
   "More" sharing the next row evenly, instead of wrapping one by one. */
@media (max-width: 640px) {
    .sip-page-header-actions > .btn-primary,
    .sip-page-header-actions > a.btn-primary {
        flex: 1 1 100%;
    }

    .sip-page-header-actions > :not(.btn-primary) {
        flex: 1 1 0;
        min-width: 0;
    }

    .sip-page-header-actions > .sip-menu .sip-menu-trigger {
        width: 100%;
        justify-content: center;
    }

    /* The trial card's actions: one per line, full width, easy to hit. */
    .dash-buttons > .btn {
        flex: 1 1 100%;
    }
}

/* Billing: each section ("Licence plans", "Quotations and invoices") clearly apart from the one above. */
.bill-section {
    margin-top: 1.75rem;
}

    .bill-section > h2 {
        margin-bottom: 0.85rem;
        font-size: var(--text-lg);
    }

/* Agency details: the form beside where billing email goes. */
.agency-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    gap: 1rem;
    align-items: start;
}

.agency-layout-main,
.agency-layout-aside {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

    .agency-layout-main .lic-form-card {
        max-width: none;
    }

    .agency-layout-aside .sip-card h2,
    .agency-layout-main .sip-card h2 {
        font-size: var(--text-lg);
        margin-bottom: 0.85rem;
    }

/* A fact with a chip after it ("… · Verified"): the chip keeps a little space and may wrap under. */
.agency-facts dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    overflow-wrap: anywhere;
}

.agency-layout-aside .agency-facts {
    grid-template-columns: minmax(0, 1fr);
}

    .agency-layout-aside .agency-facts dt {
        margin-top: 0.4rem;
    }

@media (max-width: 1100px) {
    .agency-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* My devices: the trial at a glance, with a thin meter. */
.lc-trial-card .lc-trial-title {
    margin: 0 0 0.25rem;
    font-size: var(--text-md);
    font-weight: 600;
}

.lc-trial-card .lc-trial-progress {
    margin: 0;
    color: var(--sip-text-2);
}

    .lc-trial-card .lc-trial-progress strong {
        color: var(--sip-text);
    }

.lc-trial-meter {
    height: 6px;
    margin: 0.75rem 0 0.25rem;
    border-radius: 999px;
    background: var(--sip-hairline);
    overflow: hidden;
}

    .lc-trial-meter > span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: var(--sip-text-2);
    }

.lc-trial-card .lc-tight {
    margin-top: 0.6rem;
}

/* A wizard inside the workspace (WizardShell Embedded): no glow of its own (the workspace has one),
   so no darker band shows behind the steps; and a little room above the progress row. */
.fx.fx-embed {
    background: transparent;
    padding-top: clamp(0px, 1.5vw, 12px);
}

/* Team › Invite a colleague on a trial: the email invitation, above the message to copy. */
.fx-invite-email {
    margin-bottom: 0.5rem;
}

    .fx-invite-email .fx-btn {
        margin-top: 0.9rem;
        min-height: 44px;
    }

/* The sidebar scrolls on a short screen (the operator's menu is long): a thin, quiet scrollbar in the
   line colour, not the platform's bright default. */
.app-sidebar,
.sip-menu-list,
.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: var(--sip-line-strong) transparent;
}

/* A search term found in a result: a neutral highlight (never amber), the text kept readable. */
mark.sip-mark {
    padding: 0 0.1em;
    border-radius: 3px;
    background: rgba(var(--sip-text-rgb), 0.16);
    color: var(--sip-text);
}

/* Cards stacked straight in the page (block flow) keep a gap between them; inside grids and flex
   columns the container's own gap already does this. */
.app-main > .sip-card + .sip-card,
.app-main > .sip-card + section,
.app-main > section + .sip-card {
    margin-top: var(--space-4);
}

/* ---------- the workspace shell ---------- */

/* The agency in the sidebar: its monogram tile beside the name. */
.app-agency-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-width: 0;
}

    .app-agency-row > .app-agency {
        flex: 1 1 auto;
    }

.app-agency-mark {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    margin-top: 0.1rem;
    border: 1px solid var(--sip-line-strong);
    border-radius: 10px;
    background: linear-gradient(160deg, var(--sip-raise), var(--sip-card));
    color: var(--sip-text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* "/" on the operator's search box: the shortcut, shown until the box is in use. */
.app-search-input {
    padding-right: 2rem;
}

.app-search-key {
    position: absolute;
    right: 0.5rem;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.3rem;
    border: 1px solid var(--sip-line-strong);
    border-radius: 5px;
    background: var(--sip-card);
    color: var(--sip-muted);
    font-family: var(--sip-mono);
    font-size: 0.72rem;
    line-height: 1;
    pointer-events: none;
}

    .app-search-input:focus + .app-search-key,
    .app-search-input:not(:placeholder-shown) + .app-search-key {
        display: none;
    }

/* The page fades in a touch on arrival, so a navigation reads as a change of page. */
@media (prefers-reduced-motion: no-preference) {
    /* "backwards", never "both": a transform kept after the animation makes each section a containing
       block for position: fixed, and the action menus (fixed to the viewport) open in the wrong place. */
    .app-main > * {
        animation: sip-rise 220ms var(--ease) backwards;
    }

    @keyframes sip-rise {
        /* Never from fully transparent: a throttled background tab must still show the page. */
        from {
            opacity: 0.35;
            transform: translateY(4px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }
}

/* Not found and error pages: room for their four ways forward on one row on a wide screen. */
.fx-status-page {
    max-width: 680px;
}

/* ---------- the operator dashboard ---------- */

/* Panels in a row share its height, so the grid reads as tidy rows rather than a ragged wall (two
   classes: OpGrid's scoped rule sets "start"). */
.app-main .op-grid {
    align-items: stretch;
}

/* A panel with nothing in it: quieter, and after the ones that need attention. */
.op-grid > .dash-panel.is-empty {
    order: 1;
    border-style: dashed;
    background: transparent;
    box-shadow: none;
}

    .op-grid > .dash-panel.is-empty h2 {
        color: var(--sip-text-2);
    }

.dash-panel-empty {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.dash-panel-empty-icon {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 0.2rem;
    color: var(--sip-success);
}

/* ---------- SIP for IT teams: a document with contents ---------- */

.fx-it-page.fx-help-page {
    max-width: 1080px;
}

.fx-doc-actions {
    display: flex;
    gap: 0.6rem;
    margin: -0.75rem 0 2rem;
}

.fx-doc-layout {
    display: grid;
    grid-template-columns: minmax(0, 13.5rem) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
}

.fx-doc-toc {
    position: sticky;
    top: 1.5rem;
    padding: 1rem 0 1rem 1rem;
    border-left: 1px solid var(--sip-hairline);
}

.fx-doc-toc-title {
    margin: 0 0 0.6rem !important;
    color: var(--sip-muted);
    font-size: var(--text-sm);
    font-weight: 600;
}

.fx-doc-toc ol {
    display: grid;
    gap: 0.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fx .fx-doc-toc a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: var(--sip-text-2);
    font-size: var(--text-sm);
    text-decoration: none;
}

    .fx .fx-doc-toc a:hover {
        color: var(--sip-text);
        text-decoration: underline;
        text-underline-offset: 3px;
    }

.fx-doc-body > .fx-faq:first-child {
    padding-top: 0;
    border-top: 0;
}

.fx-doc-body .fx-faq {
    scroll-margin-top: 1.5rem;
}

@media (max-width: 900px) {
    .fx-doc-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .fx-doc-toc {
        position: static;
        padding: 1rem 1.1rem;
        border: 1px solid var(--sip-hairline);
        border-radius: var(--fx-radius, 12px);
        background: var(--sip-surface);
    }

        .fx-doc-toc ol {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            column-gap: 1rem;
        }

        .fx .fx-doc-toc a {
            min-height: 40px;
        }
}

@media (max-width: 480px) {
    .fx-doc-toc ol {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media print {
    .fx-doc-actions,
    .fx-doc-toc,
    .fx-foot {
        display: none !important;
    }

    .fx-doc-layout {
        display: block;
    }
}

/* A subheading inside a help or IT section keeps clear space above it. */
.fx-faq > * + h3 {
    margin-top: 1.5rem;
}

/* ---------- operator: paid and trial licensing views ---------- */

.op-licensing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 0 0 1rem;
}

.op-licensing-option {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.8rem 1rem;
    border: 1px solid var(--sip-hairline);
    border-radius: var(--radius-md);
    background: var(--sip-card);
    color: var(--sip-text-2);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

    .op-licensing-option:hover {
        border-color: var(--sip-line-strong);
        color: var(--sip-text);
    }

    .op-licensing-option.is-selected {
        border-color: var(--sip-text-2);
        background: var(--sip-raise);
        color: var(--sip-text);
        box-shadow: inset 0 -2px 0 var(--sip-text-2);
    }

.op-licensing-label {
    color: var(--sip-text);
    font-weight: 600;
}

.op-licensing-hint {
    font-size: var(--text-sm);
    line-height: 1.4;
}

@media (max-width: 720px) {
    .op-licensing {
        grid-template-columns: minmax(0, 1fr);
    }

    .op-licensing-hint {
        display: none;
    }
}

/* Sign-up: the two optional email choices (release news, news and offers). */
.fx-consent {
    border: 0;
    margin: 0 0 var(--space-3, .75rem);
    padding: 0;
    min-width: 0;
}

.fx-consent > legend {
    float: none;
    width: auto;
    margin-bottom: var(--space-1, .25rem);
    padding: 0;
}
