/* ============================================================================
   AIToolsay — Author box (§AAB)                           redesigned 2026-09-23
   ----------------------------------------------------------------------------
   Markup: components/resources/views/partials/author-box.blade.php, rendered
   by components/public/premium-article.blade.php under every premium article
   (blog posts, tool / static pages with a body, AI news).

   ONE design with the author profile (§AAP, assets/css/author-profile.css):
   the same tokens (values mirrored from its §0 — change both together), the
   home-hero sky, orbit + conic avatar ring, accent-gradient surname, house
   eyebrow, brand pill buttons, tone-plate stats and the same hover language.

   LAYOUT answers to the box's OWN width (container queries), not the
   viewport: the box sits in article columns of very different widths (a
   9/12 column beside the blog sidebar, a full-width news story), so a
   viewport breakpoint would be wrong in one of them.
       < 700px   stacked and centred; stats 2 × 2
       ≥ 700px   avatar | copy, stats as a 4-up strip underneath
       ≥ 1080px  avatar | copy | stats as a 2 × 2 panel on the right

   SPECIFICITY — the traps this file is written around:
     · custom.ltr.css styles h1–h6 at (0,2,2): the name is `.aab-h`, styled
       at (0,4,0).
     · floating-widgets paints `.card a:hover` #2060C0 at (0,2,1), and this
       box lives INSIDE the content `.card` — every link here sets its own
       hover colour at (0,3,0)+.
     · custom.ltr.css gives every a/button a focus ring at (0,2,2) and, in
       light mode, `border-radius:6px` at (0,3,2); premium-article.css adds
       its own (0,2,0) ring with an 8px radius. §9 answers all three at
       (0,3,2)/(0,4,1) and restores each element's own radius via --aab-fr.
   ========================================================================= */


/* ---------------------------------------------------------------------------
   0. Tokens — light (dark twin in §11). Mirrors author-profile.css §0.
   ------------------------------------------------------------------------ */
.aab {
    --aab-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

    --aab-brand: #3680ED;
    --aab-brand-ink: #1B5BB5;
    --aab-brand-plate: #1C6FEB;
    --aab-sky: #60A4F5;
    --aab-soft: #EAF2FD;
    --aab-soft-2: #F4F8FE;
    --aab-line-brand: #CFE0FA;
    --aab-fill: linear-gradient(135deg, #2C6FD6 0%, #2865C5 34%, #1B4E9C 100%);
    --aab-fill-glow: rgba(53, 127, 236, .40);
    --aab-accent-text: linear-gradient(100deg, #3680ED 6%, #2060C0 58%, #1B5BB5 100%);
    --aab-focus-ring: 0 0 0 3px var(--aab-card), 0 0 0 5.5px var(--aab-brand);
    --aab-success: linear-gradient(135deg, #087F61 0%, #05664E 100%);

    --aab-ground: #FFFFFF;
    --aab-card: #FFFFFF;
    --aab-card-2: #F9FAFC;
    --aab-glass: rgba(255, 255, 255, .80);
    --aab-glass-line: rgba(255, 255, 255, .95);

    --aab-ink: #0B1220;
    --aab-ink-2: #3D4757;
    --aab-ink-3: #56616F;

    --aab-line: #E7ECF3;
    --aab-line-strong: #D6DEE9;

    --aab-sh-soft: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .05);
    --aab-sh-lift: 0 2px 6px rgba(16, 24, 40, .06), 0 18px 44px rgba(16, 24, 40, .10);

    --aab-glow-1: rgba(54, 128, 237, .18);
    --aab-glow-2: rgba(14, 165, 233, .13);
    --aab-spark: #3680ED;
    --aab-dot: rgba(54, 128, 237, .18);
    --aab-ring: rgba(54, 128, 237, .34);

    --aab-ease: cubic-bezier(.22, .61, .36, 1);
    --aab-spring: cubic-bezier(.34, 1.56, .64, 1);

    container: aab / inline-size;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(22px, 3vw, 40px);
    border-radius: 26px;
    background: var(--aab-ground);
    border: 1px solid var(--aab-line);
    box-shadow: var(--aab-sh-soft);
    color: var(--aab-ink-2);
    font-family: var(--aab-font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: border-color .4s ease, box-shadow .5s var(--aab-ease);
}
.aab *, .aab *::before, .aab *::after { box-sizing: border-box; }
.aab ul { list-style: none; margin: 0; padding: 0; }
.aab p { margin: 0; }
.aab a { text-decoration: none; }
.aab img { display: block; max-width: 100%; }
.aab svg { flex: none; }
.aab button { font: inherit; }
.aab .aab-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Colour LOCKS for :hover, outside any (hover:hover) query, and FIRST in the
   file. On touch a tap leaves :hover set, and floating-widgets'
   `.card a:hover{color:#2060C0}` (0,2,1) — this box sits inside the content
   .card — would repaint these labels (blue-on-blue on the filled button).
   Each lock has the same specificity as its real hover rule further down,
   which therefore wins wherever a hover-capable pointer exists. */
.aab .aab-copy .aab-name-a:hover      { color: var(--aab-ink); }
.aab .aab-cta .aab-btn--primary:hover { color: #FFFFFF; }
.aab .aab-cta .aab-btn--soft:hover    { color: var(--aab-brand-ink); }
.aab .aab-soc .aab-soc-a:hover        { color: var(--aab-ink-2); }

/* A light runs round the edge while the pointer is on the box (conic +
   @property; a browser without @property simply shows no light). */
@property --aab-ang {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}
.aab::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 1.5px;
    border-radius: inherit;
    background: conic-gradient(from var(--aab-ang), rgba(54, 128, 237, 0) 0 60%, var(--aab-brand) 78%, var(--aab-sky) 88%, rgba(96, 164, 245, 0) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: 0;
    animation: aab-border-run 5s linear infinite paused;
    transition: opacity .5s ease;
    pointer-events: none;
}
@media (hover: hover) {
    .aab:hover { border-color: var(--aab-line-brand); box-shadow: var(--aab-sh-lift), 0 30px 60px -36px var(--aab-fill-glow); }
    .aab:hover::after { opacity: 1; animation-play-state: running; }
}

/* Tones (stats) — §DKSYS plates, themed by dark-system.css. */
.aab [data-tone="blue"]    { --plate: var(--dk-tone-blue-plate, #1B5BB5);    --wash: rgba(54, 128, 237, .12); }
.aab [data-tone="emerald"] { --plate: var(--dk-tone-emerald-plate, #08795A); --wash: rgba(16, 185, 129, .13); }
.aab [data-tone="violet"]  { --plate: var(--dk-tone-violet-plate, #5B33C4);  --wash: rgba(124, 58, 237, .11); }
.aab [data-tone="amber"]   { --plate: var(--dk-tone-amber-plate, #A85B08);   --wash: rgba(245, 158, 11, .14); }

/* Networks — `--net` fills the icon on hover (white glyph ≥ 3:1). */
.aab [data-net]              { --net: var(--aab-brand-plate); --net-ink: #FFFFFF; }
.aab [data-net="twitter"]    { --net: #1A8CD8; }
.aab [data-net="linkedin"]   { --net: #0A66C2; }
.aab [data-net="github"]     { --net: #24292F; }
.aab [data-net="youtube"]    { --net: #E10000; }
.aab [data-net="instagram"]  { --net: #D62976; }
.aab [data-net="facebook"]   { --net: #1877F2; }
.aab [data-net="tiktok"]     { --net: #111111; }
.aab [data-net="pinterest"]  { --net: #E60023; }
.aab [data-net="medium"]     { --net: #111111; }
.aab [data-net="threads"]    { --net: #111111; }
.aab [data-net="telegram"]   { --net: #1B8BC7; }
.aab [data-net="whatsapp"]   { --net: #128C7E; }
.aab [data-net="discord"]    { --net: #5865F2; }
.aab [data-net="reddit"]     { --net: #D93A00; }
.aab [data-net="mastodon"]   { --net: #595AFF; }
.aab [data-net="dribbble"]   { --net: #C32361; }
.aab [data-net="behance"]    { --net: #1769FF; }
.aab [data-net="website"]    { --net: #1C6FEB; }
.aab [data-net="email"]      { --net: #08795A; }


/* ---------------------------------------------------------------------------
   1. Sky — glows, dot texture, sparkles (the home hero's, scaled down)
   ------------------------------------------------------------------------ */
.aab .aab-sky {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}
.aab .aab-glow { position: absolute; aspect-ratio: 1; border-radius: 50%; }
.aab .aab-glow--1 {
    width: min(620px, 120%);
    left: -18%;
    top: 50%;
    translate: 0 -50%;
    background: radial-gradient(closest-side, var(--aab-glow-1), rgba(54, 128, 237, 0));
    animation: aab-breathe 9s ease-in-out infinite;
}
.aab .aab-glow--2 {
    width: min(520px, 100%);
    right: -14%;
    top: -40%;
    background: radial-gradient(closest-side, var(--aab-glow-2), rgba(14, 165, 233, 0));
    animation: aab-breathe 12s ease-in-out -5s infinite;
}
.aab .aab-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--aab-dot) 1.2px, transparent 1.7px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(55% 85% at 12% 40%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 75%);
    mask-image: radial-gradient(55% 85% at 12% 40%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 75%);
}
.aab .aab-spark {
    position: absolute;
    width: var(--s, 13px);
    height: var(--s, 13px);
    color: var(--aab-spark);
    opacity: .2;
    animation: aab-twinkle var(--t, 4.4s) ease-in-out var(--dl, 0s) infinite;
}
.aab .aab-spark svg { display: block; width: 100%; height: 100%; }
.aab .aab-spark--1 { --s: 16px; left: 4%;  top: 9%;  --dl: -.4s; }
.aab .aab-spark--2 { --s: 10px; left: 30%; top: 6%;  --dl: -1.6s; --t: 5.2s; }
.aab .aab-spark--3 { --s: 12px; right: 5%; top: 12%; --dl: -2.4s; }
.aab .aab-spark--4 { --s: 18px; right: 26%; top: 7%; --dl: -.9s; --t: 5.6s; }
.aab .aab-spark--5 { --s: 9px;  left: 14%; bottom: 10%; --dl: -3.1s; }
.aab .aab-spark--6 { --s: 13px; right: 12%; bottom: 14%; --dl: -1.2s; --t: 4.8s; }


/* ---------------------------------------------------------------------------
   2. Grid (narrow first; §10 widens it)
   ------------------------------------------------------------------------ */
.aab .aab-in {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 18px;
    text-align: center;
}


/* ---------------------------------------------------------------------------
   3. Identity — avatar, rotating ring, two orbits, verified badge
   ------------------------------------------------------------------------ */
.aab .aab-id {
    --av: 124px;
    position: relative;
    display: grid;
    place-items: center;
    width: var(--av);
    height: var(--av);
    margin: 30px 30px 8px;
}
.aab .aab-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    border-radius: 50%;
    border: 1.5px dashed var(--aab-ring);
    pointer-events: none;
}
.aab .aab-orbit--1 { width: calc(var(--av) + 40px); height: calc(var(--av) + 40px); animation: aab-spin 40s linear infinite; }
.aab .aab-orbit--2 {
    width: calc(var(--av) + 92px);
    height: calc(var(--av) + 92px);
    border-style: dotted;
    border-width: 2px;
    opacity: .7;
    animation: aab-spin 64s linear infinite reverse;
}
.aab .aab-orbit::before {
    content: "";
    position: absolute;
    border-radius: 50%;
}
.aab .aab-orbit--1::before {
    width: 10px; height: 10px;
    left: -5px; top: 50%;
    translate: 0 -50%;
    background: var(--aab-brand);
    box-shadow: 0 0 0 4px var(--aab-soft), 0 0 14px var(--aab-fill-glow);
}
.aab .aab-orbit--2::before {
    width: 8px; height: 8px;
    right: 4%; bottom: 24%;
    background: #8CBEFA;
    box-shadow: 0 0 0 3px var(--aab-soft), 0 0 10px rgba(96, 164, 245, .6);
}
.aab .aab-avatar {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 5px;
    border-radius: 50%;
    transition: transform .6s var(--aab-spring);
}
.aab .aab-avatar-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #3680ED, #60A4F5, #A9CCFB, #2060C0, #3680ED);
    box-shadow: 0 18px 44px -14px var(--aab-fill-glow);
    animation: aab-spin 9s linear infinite;
}
.aab .aab-avatar-img {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--aab-soft);
    border: 4px solid var(--aab-ground);
}
.aab .aab-avatar-fallback {
    color: #FFFFFF;
    font-size: calc(var(--av) * .36);
    font-weight: 800;
    background: linear-gradient(135deg, #60A4F5, #2060C0);
}
.aab .aab-badge {
    position: absolute;
    z-index: 2;
    right: 3%;
    bottom: 3%;
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    padding: 3px;
    border-radius: 50%;
    background: var(--aab-ground);
    box-shadow: 0 8px 18px -6px rgba(54, 128, 237, .55);
}
.aab .aab-badge svg { display: block; width: 100% !important; height: 100% !important; }
@media (hover: hover) {
    .aab .aab-id:hover .aab-avatar { transform: scale(1.04) rotate(-2deg); }
}


/* ---------------------------------------------------------------------------
   4. Copy — eyebrow, verified pill, name, role, bio
   ------------------------------------------------------------------------ */
.aab .aab-copy {
    container: aab-copy / inline-size;
    width: 100%;                /* inline-size containment has no content width */
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.aab .aab-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.aab .aab-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 15px 6px 11px;
    border-radius: 999px;
    background: var(--aab-soft);
    border: 1px solid var(--aab-line-brand);
    color: var(--aab-brand-ink);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .02em;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.aab .aab-eyebrow svg { width: 13px; height: 13px; color: var(--aab-brand); }
.aab .aab-verified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px 5px 6px;
    border-radius: 999px;
    background: var(--aab-card);
    border: 1px solid var(--aab-line);
    color: var(--aab-ink-2);
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.25;
}
.aab .aab-verified svg { width: 18px !important; height: 18px !important; }

.aab .aab-copy .aab-h.aab-name {
    max-width: 100%;
    margin: 14px 0 0;
    font-size: clamp(26px, 5.5cqi, 40px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.03em;
    color: var(--aab-ink);
    overflow-wrap: break-word;
}
.aab .aab-accent {
    color: var(--aab-brand);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .aab .aab-accent {
        background-image: var(--aab-accent-text);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}
/* The name link: ink at rest, a brand underline sweeps in on hover. */
.aab .aab-copy .aab-name-a {
    color: var(--aab-ink);
    background: linear-gradient(90deg, var(--aab-brand), var(--aab-sky)) 0 100% / 0 3px no-repeat;
    padding-bottom: 3px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-size .45s var(--aab-ease), color .25s ease;
}
@media (hover: hover) {
    .aab .aab-copy .aab-name-a:hover { color: var(--aab-brand-ink); background-size: 100% 3px; }
}

.aab .aab-role {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 14px;
    margin-top: 10px;
    font-size: 15.5px;
    font-weight: 650;
    line-height: 1.45;
    color: var(--aab-brand-ink);
}
.aab .aab-loc {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--aab-ink-3);
    font-weight: 600;
    font-size: 14px;
}
.aab .aab-bio {
    max-width: 62ch;
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.72;
    color: var(--aab-ink-2);
}


/* ---------------------------------------------------------------------------
   5. Actions — primary, soft, network circles
   ------------------------------------------------------------------------ */
.aab .aab-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 22px;
}
.aab .aab-btn {
    --aab-fr: 999px;
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.005em;
    white-space: normal;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .3s var(--aab-ease), box-shadow .3s var(--aab-ease), color .22s ease, background-color .22s ease;
}
.aab .aab-btn:active { transform: translateY(0) scale(.98); }

/* Primary — `--aab-fill` + the search button's inset light; a sheen sweeps
   across on hover and the arrow steps forward. */
.aab .aab-cta .aab-btn--primary {
    padding: 0 7px 0 24px;
    color: #FFFFFF;
    background-color: #2B6BCC;
    background-image: var(--aab-fill);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .30),
        inset 0 0 0 1px rgba(255, 255, 255, .10),
        0 2px 6px -2px rgba(11, 18, 32, .22),
        0 12px 28px -10px var(--aab-fill-glow);
}
.aab .aab-btn--primary::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .34) 50%, transparent 65%) no-repeat;
    background-size: 260% 100%;
    background-position: 140% 0;
    transition: background-position .9s var(--aab-ease);
    pointer-events: none;
}
.aab .aab-btn-arrow {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
    transition: transform .4s var(--aab-spring), background-color .25s ease;
}
@media (hover: hover) {
    .aab .aab-cta .aab-btn--primary:hover {
        color: #FFFFFF;
        transform: translateY(-2px);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .30),
            inset 0 0 0 1px rgba(255, 255, 255, .10),
            0 4px 10px -2px rgba(11, 18, 32, .24),
            0 20px 38px -12px var(--aab-fill-glow);
    }
    .aab .aab-btn--primary:hover::before { background-position: -40% 0; }
    .aab .aab-btn--primary:hover .aab-btn-arrow { transform: translateX(3px); background: rgba(255, 255, 255, .28); }
}

/* Soft — tinted at rest, fills with the brand gradient on hover. */
.aab .aab-cta .aab-btn--soft {
    padding: 0 7px 0 20px;
    color: var(--aab-brand-ink);
    background-color: var(--aab-soft);
    box-shadow: inset 0 0 0 1px var(--aab-line-brand);
}
.aab .aab-btn--soft::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--aab-fill);
    opacity: 0;
    transition: opacity .25s ease;
}
.aab .aab-btn-dot {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--aab-brand-plate);
    color: #FFFFFF;
    transition: transform .45s var(--aab-spring), background-color .25s ease;
}
@media (hover: hover) {
    .aab .aab-cta .aab-btn--soft:hover {
        color: #FFFFFF;
        transform: translateY(-2px);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0), 0 16px 30px -12px var(--aab-fill-glow);
    }
    .aab .aab-btn--soft:hover::before { opacity: 1; }
    .aab .aab-btn--soft:hover .aab-btn-dot { background: rgba(255, 255, 255, .22); transform: rotate(-14deg) scale(1.06); }
}
.aab .aab-cta .aab-btn--soft.is-done { color: #FFFFFF; }
.aab .aab-btn--soft.is-done::before { opacity: 1; background: var(--aab-success); }
.aab .aab-btn--soft.is-done .aab-btn-dot { background: rgba(255, 255, 255, .22); }

/* Networks. */
.aab .aab-soc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
@container aab-copy (min-width: 620px) {
    /* Divider only when buttons AND icons share one line (they need ~600px). */
    .aab .aab-cta .aab-soc { margin-left: 4px; padding-left: 16px; border-left: 1px solid var(--aab-line-strong); }
}
.aab .aab-soc-a {
    --aab-fr: 50%;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--aab-card);
    border: 1px solid var(--aab-line-strong);
    color: var(--aab-ink-2);
    font-size: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
    transition: transform .35s var(--aab-spring), color .25s ease, border-color .25s ease, box-shadow .35s ease;
}
.aab .aab-soc-a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 50%;
    background: var(--net);
    transform: scale(0);
    transition: transform .4s var(--aab-ease);
}
@media (hover: hover) {
    .aab .aab-soc .aab-soc-a:hover {
        color: var(--net-ink);
        border-color: transparent;
        transform: translateY(-3px);
        box-shadow: 0 12px 24px -10px var(--net);
    }
    .aab .aab-soc .aab-soc-a:hover::before { transform: scale(1); }
}


/* ---------------------------------------------------------------------------
   7. Stats — ONE glass panel; the hairlines are each cell's own top/left
   shadow, so they sit only BETWEEN cells in any arrangement (2 × 2, 4-up,
   odd last cell spanning) — the outermost ones fall under the panel border.
   ------------------------------------------------------------------------ */
.aab .aab-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--aab-glass);
    border: 1px solid var(--aab-glass-line);
    box-shadow: var(--aab-sh-lift);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    text-align: left;
}
.aab .aab-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.aab .aab-stat {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 16px 16px;
    box-shadow: -1px 0 0 var(--aab-line), 0 -1px 0 var(--aab-line);
}
.aab .aab-stat::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(130% 150% at 0% 50%, var(--wash), transparent 62%);
    opacity: 0;
    transition: opacity .4s ease;
}
.aab .aab-stat:hover::before { opacity: 1; }
.aab .aab-stat-ico {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    flex: none;
    border-radius: 13px;
    color: #FFFFFF;
    background-color: var(--plate);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .26) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 10px 22px -10px var(--plate);
    transition: transform .5s var(--aab-spring);
}
.aab .aab-stat:hover .aab-stat-ico { transform: rotate(-8deg) scale(1.07); }
.aab .aab-stat-copy { display: flex; flex-direction: column; min-width: 0; }
.aab .aab-stat-num {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--aab-ink);
    font-variant-numeric: tabular-nums;
}
.aab .aab-stat-plus { margin-left: 1px; color: var(--aab-brand); }
.aab .aab-stat-label {
    margin-top: 3px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--aab-ink-3);
}


/* ---------------------------------------------------------------------------
   8. Motion
   ------------------------------------------------------------------------ */
@keyframes aab-spin       { to { transform: rotate(360deg); } }
@keyframes aab-border-run { to { --aab-ang: 360deg; } }
@keyframes aab-breathe {
    0%, 100% { transform: scale(1);    opacity: .85; }
    50%      { transform: scale(1.08); opacity: 1; }
}
@keyframes aab-twinkle {
    0%, 100% { opacity: .18; transform: scale(.62) rotate(0deg); }
    50%      { opacity: .95; transform: scale(1) rotate(45deg); }
}


/* ---------------------------------------------------------------------------
   9. Focus — beats the site's (0,2,2) ring, its light-mode (0,3,2) 6px radius
   and premium-article.css's (0,2,0) 8px radius. Each element keeps its OWN
   radius through --aab-fr (set in its base rule).
   ------------------------------------------------------------------------ */
body:not(.admin-shell) .aab a:focus-visible,
body:not(.admin-shell) .aab button:focus-visible {
    outline: none;
    box-shadow: var(--aab-focus-ring);
    border-radius: var(--aab-fr, 8px);
}
body:not(.admin-shell) .aab .aab-btn--primary:focus-visible {
    box-shadow: var(--aab-focus-ring), 0 12px 28px -10px var(--aab-fill-glow);
}
body:not(.admin-shell) .aab .aab-btn--soft:focus-visible { color: #FFFFFF; }
body:not(.admin-shell) .aab .aab-btn--soft:focus-visible::before { opacity: 1; }
.aab .aab-name-a { --aab-fr: 6px; }


/* ---------------------------------------------------------------------------
   10. Layout by the box's own width
   ------------------------------------------------------------------------ */
@container aab (min-width: 460px) {
    .aab .aab-id { --av: 136px; }
    .aab .aab-stat { padding: 16px 18px; }
}

@container aab (min-width: 700px) {
    .aab .aab-in {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas: "id copy" "stats stats";
        justify-items: stretch;
        align-items: center;
        column-gap: 36px;
        row-gap: 26px;
        text-align: left;
    }
    .aab .aab-id { --av: 150px; grid-area: id; margin: 34px; justify-self: center; }
    .aab .aab-copy { grid-area: copy; align-items: flex-start; }
    .aab .aab-top, .aab .aab-role, .aab .aab-cta, .aab .aab-soc { justify-content: flex-start; }
    .aab .aab-stats { grid-area: stats; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); margin-top: 0; }
    .aab .aab-stat:last-child:nth-child(odd) { grid-column: auto; }
    .aab .aab-dots {
        -webkit-mask-image: radial-gradient(40% 85% at 10% 40%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 75%);
        mask-image: radial-gradient(40% 85% at 10% 40%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 75%);
    }
}

@container aab (min-width: 1080px) {
    .aab .aab-in {
        grid-template-columns: auto minmax(0, 1fr) minmax(280px, 340px);
        grid-template-areas: "id copy stats";
        column-gap: 40px;
    }
    .aab .aab-id { --av: 168px; }
    .aab .aab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: center; }
    .aab .aab-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .aab .aab-stat { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; }
}

/* Narrow boxes: full-width buttons, stacked stat cells. */
@container aab (max-width: 459.98px) {
    .aab .aab-cta > .aab-btn { flex: 1 1 100%; justify-content: space-between; }
    .aab .aab-cta .aab-btn--primary { padding-left: 22px; }
    .aab .aab-soc { width: 100%; padding-top: 14px; border-top: 1px solid var(--aab-line); }
    .aab .aab-stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
    .aab .aab-stat-ico { width: 40px; height: 40px; border-radius: 12px; }
    .aab .aab-stat-num { font-size: 21px; }
    .aab .aab-spark--2, .aab .aab-spark--4 { display: none; }
}
@media (max-width: 479.98px) {
    .aab { border-radius: 22px; }
}


/* ---------------------------------------------------------------------------
   11. Dark mode — a token swap (values = author-profile.css §16)
   ------------------------------------------------------------------------ */
body.theme-dark .aab {
    --aab-brand: #60A4F5;
    --aab-brand-ink: #8CBEFA;
    --aab-brand-plate: #2572DF;
    --aab-soft: rgba(54, 128, 237, .16);
    --aab-soft-2: rgba(54, 128, 237, .10);
    --aab-line-brand: rgba(96, 164, 245, .30);
    --aab-fill:
        linear-gradient(0deg, rgba(9, 18, 33, .34), rgba(9, 18, 33, .34)),
        linear-gradient(135deg, #357FEC 0%, #2B6BCC 34%, #1B4E9C 100%);
    --aab-fill-glow: rgba(53, 127, 236, .52);
    --aab-accent-text: linear-gradient(100deg, #60A4F5 6%, #4A8FE8 58%, #8CBEFA 100%);
    --aab-success: linear-gradient(0deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .12)), linear-gradient(135deg, #087F61 0%, #05664E 100%);

    --aab-ground: var(--dk-bg, #0E0E11);
    --aab-card: var(--dk-surface-2, #17171B);
    --aab-card-2: var(--dk-surface-3, #1D1D22);
    --aab-glass: rgba(28, 28, 33, .74);
    --aab-glass-line: rgba(255, 255, 255, .10);

    --aab-ink: var(--dk-text, #F4F5F7);
    --aab-ink-2: var(--dk-text-2, #C7CAD1);
    --aab-ink-3: var(--dk-text-3, #9AA0AB);

    --aab-line: var(--dk-line, rgba(255, 255, 255, .10));
    --aab-line-strong: var(--dk-line-strong, rgba(255, 255, 255, .16));

    --aab-sh-soft: 0 1px 2px rgba(0, 0, 0, .40);
    --aab-sh-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 44px rgba(0, 0, 0, .45);

    --aab-glow-1: rgba(54, 128, 237, .22);
    --aab-glow-2: rgba(56, 189, 248, .11);
    --aab-spark: #A9CCFB;
    --aab-dot: rgba(96, 164, 245, .15);
    --aab-ring: rgba(96, 164, 245, .32);
}
/* Near-black networks invert on the near-black box. */
body.theme-dark .aab [data-net="github"],
body.theme-dark .aab [data-net="tiktok"],
body.theme-dark .aab [data-net="medium"],
body.theme-dark .aab [data-net="threads"] { --net: #F4F5F7; --net-ink: #0B1220; }
body.theme-dark .aab .aab-btn-dot { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }


/* ---------------------------------------------------------------------------
   12. Reduced motion, forced colours, print
   ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .aab, .aab *, .aab::after, .aab *::before, .aab *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}
@media (forced-colors: active) {
    .aab .aab-accent { background: none; -webkit-text-fill-color: currentColor; color: CanvasText; }
    .aab .aab-sky, .aab .aab-orbit, .aab::after { display: none; }
    .aab .aab-btn { border: 1px solid ButtonText; }
}
@media print {
    .aab .aab-sky, .aab .aab-orbit, .aab .aab-cta { display: none !important; }
    .aab, .aab * { animation: none !important; box-shadow: none !important; }
}
