/* Atlas host branding, loaded by the portal's shell layout via
   config('branding.css') AFTER the portal's own CSS — which is what lets the
   rules below override upstream's without touching the submodule.

   Host-owned styling only; anything generic belongs upstream in the portal.

   Note this stylesheet is NOT loaded on the sign-in page: that view pulls only
   the UI, theme and portal stylesheets, so the sign-in treatment has to come
   through config('branding.login.*') instead. */

/* ---------- brand mark ---------- */

/* Full colour, deliberately. The wordmark is the Atlas red, and
   --portal-color-primary is now that same red (branding/config.php), so the mark
   agrees with the chrome instead of fighting it. This rule used to carry
   filter: grayscale(1) contrast(1.15), which was the right answer only while the
   shell was monochrome slate. Size, because the lockup is the wordmark alone. */
.cp-brand-wordmark {
    max-width: 15rem;
    max-height: 4rem;
}

/* Centre the wordmark in the rail. The brand row is otherwise left-aligned for
   the logo + name + tagline lockup, which Atlas does not use. */
.cp-brand {
    justify-content: center;
}

/* ---------- stat tiles: six across, brand chips ---------- */

/* Six tiles in one row (Matt, 2026-07-28). Upstream fixes four columns and drops
   to two under 1100px.

   auto-fit rather than repeat(6, 1fr), so this needs no breakpoint of its own and
   cannot strand a tile: it packs as many >=9rem columns as the row will hold — six
   at a desktop width, fewer as the window narrows — and because this stylesheet
   loads after the portal's, it also supersedes upstream's two-column rule at the
   bottom end rather than fighting it.

   Tighter gap and padding to buy the width six columns need. 9rem is the floor at
   which "Monthly recurring" still sits on one line under its value. */
.cp-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.75rem;
}

.cp-stat {
    padding: 1rem;
}

/* The icon chip and the inspiration panel are NOT overridden here. Upstream
   already paints both from --portal-color-brand, and branding/config.php now sets
   that token to the Atlas red — so restating them would be a second copy of
   upstream's own design, drifting the moment it changes. */

/* ---------- widget motif: signal, not isometrics ---------- */

/* Upstream draws an isometric cube lattice in the corner of every stat tile and
   on the dashboard quote panel. Atlas is a telecommunications brand, so the
   motif becomes a SIGNAL one: concentric wavefronts radiating from the corner
   the tile's own mask already fades toward, over a faint field of network nodes.

   Both layers are overridden together with background-size and
   background-position, because upstream sets neither and relies on the defaults
   the arcs and the node grid each need to be given explicitly.

   The motif is drawn in the BRAND PRIMARY rather than upstream's slate (Matt,
   2026-07-28) — so it reads as Atlas red rather than as grey chrome. Alphas are
   lower than upstream's slate ones (0.55/0.35 against 0.85/0.7) on purpose:
   #d00a11 is a far more saturated ink than slate-400, and at slate's weights it
   stopped being a background and started competing with the value and label
   printed on top of it. Same corner mask, same geometry — only the hue and the
   volume changed. */
.cp-stat-halo {
    background-image:
        /* Wavefronts: a hairline ring every 18px, centred on the top-right
           corner, so the pattern reads as a broadcast rather than a texture. */
        repeating-radial-gradient(circle at 100% 0%,
            rgb(var(--portal-color-primary) / 0.55) 0 1.5px,
            transparent 1.5px 18px),
        /* Node field: a 12px dot grid, the network the signal crosses. Kept
           lighter than the arcs so it sits behind them. */
        radial-gradient(
            rgb(var(--portal-color-primary) / 0.35) 1px,
            transparent 1.2px);
    background-size: auto, 12px 12px;
    background-position: 100% 0%, 100% 0%;
    /* Scaled down with the tile: at six across a 12rem motif was wider than the
       tile itself, so the rings were cropped into near-straight lines. */
    width: 9rem;
    height: 6.5rem;
}

/* The inspiration panel's COLOUR comes from --portal-color-brand upstream; only
   its motif is host-owned, and it stays WHITE. #d00a11 drawn on #d00a11 would be
   invisible, and upstream's white pair already works on any panel colour. */

/* Louder here than on the tiles (Matt, 2026-07-28): a 0.18 hairline that reads as
   texture behind a stat value disappears on a large flat panel, where it is the
   only thing in the upper two thirds. Alpha up, ring weight up, and the motif
   given more of the panel to cross — the mask still fades it out well before the
   quote. */
.cp-quote-panel::before {
    width: 20rem;
    height: 13rem;
    background-image:
        repeating-radial-gradient(circle at 100% 0%,
            rgba(255, 255, 255, 0.42) 0 2px,
            transparent 2px 20px),
        radial-gradient(
            rgba(255, 255, 255, 0.26) 1.2px,
            transparent 1.4px);
    background-size: auto, 13px 13px;
    background-position: 100% 0%, 100% 0%;
}
