/* Nexlla buyer guides: /guides hub and /guides/<slug> (TKT-0009).
   Server-rendered long-form pages built on the nexlla-2026.css tokens.
   Design rule (Tarek): no box may have a top border that differs from its
   other sides, and no thin top bars. Every bordered element below uses one
   uniform border; dividers are bottom-only rules between list rows. */

.nx-guides-page { overflow-x: clip; }
.nx-guides-page #dsn-scrollbar { overflow-x: clip; }

/* ════════════ Hero ════════════ */
.nx-ghero {
    position: relative;
    padding: clamp(120px, 17vh, 190px) clamp(16px, 5vw, 64px) clamp(36px, 5vh, 64px);
    isolation: isolate;
    overflow: hidden;
}
.nx-ghero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(ellipse 60% 55% at 15% 20%, rgba(197, 205, 214, .10), transparent 62%),
        radial-gradient(ellipse 50% 45% at 92% 85%, rgba(255, 179, 122, .05), transparent 60%);
}
.nx-ghero__inner {
    max-width: var(--nx-w); margin-inline: auto;
    display: grid; grid-template-columns: minmax(0, 1fr);
    gap: clamp(18px, 2.6vh, 28px);
}
.nx-gcrumbs ol {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
    list-style: none; margin: 0; padding: 0;
    font-family: var(--nx-font-mono); font-size: 11px;
    letter-spacing: .18em; text-transform: uppercase;
    color: var(--nx-color-text-dim);
}
.nx-gcrumbs li { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.nx-gcrumbs li + li::before { content: "/"; color: var(--nx-color-text-dim); }
.nx-gcrumbs a { color: var(--nx-color-text-muted); text-decoration: none; transition: color var(--nx-dur) var(--nx-ease-out); }
.nx-gcrumbs a:hover { color: var(--nx-color-text); }
.nx-gcrumbs [aria-current] { color: var(--nx-color-accent); }

.nx-ghero__title {
    font-family: var(--nx-font-display);
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    font-weight: 700; line-height: 1.05; letter-spacing: -.03em;
    margin: 0; max-width: 13em; /* em, not ch: ch changes when the web font swaps in (CLS) */
    color: var(--nx-color-text);
    overflow-wrap: break-word;
}
.nx-ghero__title em {
    font-family: var(--nx-font-serif);
    font-style: italic; font-weight: 400;
    color: var(--nx-color-accent);
    /* CLS: the serif fallback has different ascent/descent from Plex Serif, which
       grew the line box when the web font swapped in. A zero inline line-height
       lets the H1's own strut set every line height, before and after the swap. */
    line-height: 0;
}
.nx-ghero__lede {
    max-width: 36em; margin: 0;
    font-size: clamp(1rem, 1.3vw, 1.18rem); line-height: 1.7;
    color: var(--nx-color-text-muted);
}
.nx-ghero__lede strong { color: var(--nx-color-text); font-weight: 500; }
.nx-ghero__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-chip {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--nx-font-mono); font-size: 10.5px;
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--nx-color-text-muted);
    padding: 7px 13px;
    border: 1px solid var(--nx-color-line);
    border-radius: 999px;
    background: rgba(241, 237, 228, .02);
}

/* ════════════ Body shell: TOC + prose ════════════ */
.nx-gbody { padding: clamp(20px, 4vw, 56px) clamp(16px, 5vw, 64px) clamp(64px, 9vw, 120px); }
.nx-gbody__shell {
    max-width: var(--nx-w); margin-inline: auto;
    display: grid; grid-template-columns: minmax(0, 1fr);
    gap: 32px; align-items: start;
}
@media (min-width: 1100px) {
    .nx-gbody__shell { grid-template-columns: 270px minmax(0, 1fr); gap: clamp(48px, 5vw, 88px); }
}

/* TOC */
.nx-gtoc { position: relative; min-width: 0; }
@media (min-width: 1100px) { .nx-gtoc { will-change: transform; } }
.nx-gtoc__label {
    font-family: var(--nx-font-mono); font-size: 10.5px;
    letter-spacing: .22em; text-transform: uppercase;
    color: var(--nx-color-text-muted); margin: 0 0 10px;
}
.nx-gtoc__list {
    display: flex; flex-direction: column;
    counter-reset: nxgtoc;
    border: 1px solid var(--nx-color-line);
    border-radius: var(--nx-radius-lg);
    background: var(--nx-color-surface);
    padding: 6px;
}
.nx-gtoc__list a {
    counter-increment: nxgtoc;
    display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px;
    padding: 9px 10px; border-radius: var(--nx-radius-md);
    font-size: .9rem; line-height: 1.4;
    color: var(--nx-color-text-muted); text-decoration: none;
    transition: color var(--nx-dur) var(--nx-ease-out), background var(--nx-dur) var(--nx-ease-out);
}
.nx-gtoc__list a::before {
    content: counter(nxgtoc, decimal-leading-zero);
    font-family: var(--nx-font-mono); font-size: 10.5px; letter-spacing: .1em;
    color: var(--nx-color-text-dim); padding-top: 2px;
}
.nx-gtoc__list a:hover, .nx-gtoc__list a.is-active { color: var(--nx-color-text); background: rgba(197, 205, 214, .06); }
.nx-gtoc__list a.is-active::before { color: var(--nx-color-accent); }
.nx-gtoc__cta {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
    font-family: var(--nx-font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--nx-color-text); text-decoration: none; line-height: 1.5;
}
.nx-gtoc__cta:hover { color: var(--nx-color-accent); }
@media (max-width: 1099px) {
    .nx-gtoc__list { max-height: none; }
    .nx-gtoc__cta { display: none; }
}

/* ════════════ Prose ════════════ */
.nx-gprose { min-width: 0; max-width: 780px; color: var(--nx-color-text); }
.nx-gprose > * + * { margin-top: 0; }
.nx-gprose p, .nx-gprose li {
    font-family: var(--nx-font-sans);
    font-size: clamp(1rem, .96rem + .22vw, 1.1rem);
    line-height: 1.75;
    color: rgba(229, 233, 238, .74);
}
.nx-gprose p { margin: 0 0 18px; }
.nx-gprose strong { color: var(--nx-color-text); font-weight: 600; }
.nx-gprose a {
    color: var(--nx-color-text);
    text-decoration: underline; text-decoration-thickness: 1px;
    text-underline-offset: 4px; text-decoration-color: rgba(229, 233, 238, .4);
    overflow-wrap: anywhere;
    transition: text-decoration-color var(--nx-dur) var(--nx-ease-out);
}
.nx-gprose a:hover { text-decoration-color: var(--nx-color-text); }
.nx-gprose code {
    font-family: var(--nx-font-mono); font-size: .88em;
    padding: 1px 6px; border-radius: 4px;
    border: 1px solid var(--nx-color-line);
    background: rgba(197, 205, 214, .06);
    color: var(--nx-color-text);
    overflow-wrap: anywhere;
}
.nx-gsec { margin: 0; }
.nx-gprose h2 {
    font-family: var(--nx-font-display);
    font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem);
    font-weight: 700; line-height: 1.15; letter-spacing: -.02em;
    color: var(--nx-color-text);
    margin: clamp(52px, 6vw, 72px) 0 18px;
    scroll-margin-top: 110px;
    overflow-wrap: break-word;
}
.nx-gprose h3 {
    font-family: var(--nx-font-display);
    font-size: clamp(1.12rem, 1.05rem + .3vw, 1.3rem);
    font-weight: 600; line-height: 1.3; letter-spacing: -.01em;
    color: var(--nx-color-text);
    margin: 32px 0 12px;
}
.nx-gprose ul, .nx-gprose ol { margin: 0 0 22px; padding: 0; list-style: none; }
.nx-gprose li { position: relative; padding-left: 26px; margin: 0 0 10px; }
.nx-gprose ul > li::before {
    content: ""; position: absolute; left: 2px; top: .78em;
    width: 12px; height: 1px; background: var(--nx-color-text-muted);
}
.nx-gprose ol { counter-reset: nxgol; }
.nx-gprose ol > li { counter-increment: nxgol; }
.nx-gprose ol > li::before {
    content: counter(nxgol) "."; position: absolute; left: 0; top: 0;
    font-family: var(--nx-font-mono); font-size: .85rem; color: var(--nx-color-text-muted);
    line-height: 2.05;
}

/* Checklists */
.nx-gprose ul.nx-check > li { padding-left: 34px; }
.nx-gprose ul.nx-check > li::before {
    width: 18px; height: 18px; top: .32em; left: 0;
    border: 1px solid var(--nx-color-line-strong); border-radius: 5px;
    background: rgba(197, 205, 214, .05);
}
.nx-gprose ul.nx-check > li::after {
    content: ""; position: absolute; left: 6px; top: calc(.32em + 4px);
    width: 5px; height: 9px;
    border: solid var(--nx-color-text); border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

/* Callout note */
.nx-g-note {
    margin: 26px 0;
    padding: 18px 22px;
    border: 1px solid var(--nx-color-line-strong);
    border-radius: var(--nx-radius-lg);
    background: rgba(197, 205, 214, .05);
}
.nx-g-note p:last-child { margin-bottom: 0; }
.nx-g-note p { color: var(--nx-color-text); }

/* Tables: scroll sideways inside their own box on phones */
.nx-table-wrap {
    width: 100%; max-width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 8px 0 26px;
    border: 1px solid var(--nx-color-line);
    border-radius: var(--nx-radius-lg);
    background: var(--nx-color-surface);
}
.nx-table-wrap table { width: 100%; min-width: 560px; border-collapse: collapse; margin: 0; font-size: .94rem; }
.nx-table-wrap th, .nx-table-wrap td {
    text-align: left; vertical-align: top;
    padding: 12px 14px;
    border-bottom: 1px solid var(--nx-color-line);
    color: rgba(229, 233, 238, .74);
    line-height: 1.55;
}
.nx-table-wrap tbody tr:last-child td { border-bottom: 0; }
.nx-table-wrap th {
    font-family: var(--nx-font-mono); font-size: 10.5px; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--nx-color-text);
    background: rgba(197, 205, 214, .04);
}
.nx-table-wrap td strong { color: var(--nx-color-text); }

/* Answer-first summary */
.nx-ganswer {
    margin: 0 0 8px;
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid var(--nx-color-line-strong);
    border-radius: var(--nx-radius-xl);
    background:
        radial-gradient(ellipse 70% 90% at 100% 0%, rgba(197, 205, 214, .08), transparent 60%),
        var(--nx-color-surface);
    scroll-margin-top: 110px;
}
.nx-ganswer__label {
    font-family: var(--nx-font-mono) !important; font-size: 10.5px !important;
    letter-spacing: .22em; text-transform: uppercase;
    color: var(--nx-color-accent) !important; margin: 0 0 12px !important;
    line-height: 1.4 !important;
}
.nx-ganswer__label--sub { margin-top: 22px !important; color: var(--nx-color-text-muted) !important; }
.nx-ganswer > p:not(.nx-ganswer__label) { color: var(--nx-color-text); font-size: clamp(1.02rem, .98rem + .3vw, 1.16rem); }
.nx-ganswer ul { margin-bottom: 0; }
.nx-ganswer li:last-child { margin-bottom: 0; }

/* Not-legal-advice callout */
.nx-gdisclaimer {
    display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: start;
    margin: 0 0 24px;
    padding: 16px 20px;
    border: 1px solid rgba(197, 138, 45, .45);
    border-radius: var(--nx-radius-lg);
    background: rgba(197, 138, 45, .08);
}
.nx-gdisclaimer + .nx-ganswer { margin-top: 0; }
#disclaimer-foot { margin: 40px 0 0; }
/* Top callout is a direct child of the body grid (before the TOC), so mobile readers see it first. */
.nx-gbody__shell > .nx-gdisclaimer { margin: 0; min-width: 0; max-width: 780px; }
@media (min-width: 1100px) {
    .nx-gbody__shell { row-gap: 0; }
    .nx-gbody__shell > .nx-gtoc { grid-column: 1; grid-row: 1 / span 2; }
    .nx-gbody__shell > .nx-gdisclaimer { grid-column: 2; grid-row: 1; margin-bottom: 24px; }
    .nx-gbody__shell > .nx-gprose { grid-column: 2; grid-row: 2; }
}
.nx-gdisclaimer__icon {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px; border-radius: 999px;
    border: 1px solid rgba(197, 138, 45, .7);
    font-family: var(--nx-font-mono); font-size: 13px; font-weight: 700;
    color: #E8B866;
}
.nx-gdisclaimer p, .nx-gprose .nx-gdisclaimer p { margin: 0; color: var(--nx-color-text); font-size: .98rem; line-height: 1.6; }

/* FAQ */
.nx-gfaq details {
    border: 1px solid var(--nx-color-line);
    border-radius: var(--nx-radius-lg);
    background: var(--nx-color-surface);
    padding: 0;
    margin: 0 0 10px;
    transition: border-color var(--nx-dur) var(--nx-ease-out);
}
.nx-gfaq details[open] { border-color: var(--nx-color-line-strong); }
.nx-gfaq summary {
    cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    padding: 16px 20px;
    font-family: var(--nx-font-display); font-weight: 600;
    font-size: 1.02rem; line-height: 1.4; color: var(--nx-color-text);
}
.nx-gfaq summary::-webkit-details-marker { display: none; }
.nx-gfaq summary::after { content: "+"; flex: 0 0 auto; font-family: var(--nx-font-mono); color: var(--nx-color-text-muted); }
.nx-gfaq details[open] summary::after { content: "\2013"; }
.nx-gfaq summary:focus-visible { outline: 2px solid var(--nx-color-accent); outline-offset: 2px; border-radius: var(--nx-radius-lg); }
.nx-gfaq details p { margin: 0; padding: 0 20px 18px; }

/* Sources */
.nx-gsources p, .nx-gsources li { font-size: .95rem; }
.nx-gsources ol > li { margin-bottom: 8px; }

.nx-gbyline {
    margin: 36px 0 0 !important;
    font-size: .92rem !important;
    color: var(--nx-color-text-muted) !important;
}

/* CTA panel */
.nx-gcta {
    margin-top: 40px;
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid var(--nx-color-line-strong);
    border-radius: var(--nx-radius-xl);
    background:
        radial-gradient(ellipse 60% 80% at 92% 10%, rgba(197, 205, 214, .10), transparent 60%),
        var(--nx-color-surface);
    display: grid; gap: 14px;
}
.nx-gprose .nx-gcta__eyebrow, .nx-gcta__eyebrow {
    font-family: var(--nx-font-mono); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
    color: var(--nx-color-accent); margin: 0;
}
.nx-gprose .nx-gcta__title {
    margin: 0; font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem);
}
.nx-gprose .nx-gcta__lede { margin: 0; }
.nx-gcta__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.nx-gbtn, .nx-gprose a.nx-gbtn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 20px; border-radius: 999px;
    font-family: var(--nx-font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    text-decoration: none; line-height: 1.2;
    border: 1px solid var(--nx-color-line-strong);
    transition: transform var(--nx-dur) var(--nx-ease-out), background var(--nx-dur) var(--nx-ease-out), border-color var(--nx-dur) var(--nx-ease-out), color var(--nx-dur) var(--nx-ease-out);
}
.nx-gbtn--primary, .nx-gprose a.nx-gbtn--primary, .nx-gbtn--primary:visited {
    background: var(--nx-color-accent); border-color: var(--nx-color-accent);
    color: var(--nx-color-text-invert);
}
.nx-gbtn--ghost, .nx-gprose a.nx-gbtn--ghost { color: var(--nx-color-text); background: transparent; }
.nx-gbtn:hover { transform: translateY(-2px); }
.nx-gbtn--ghost:hover { border-color: var(--nx-color-text); }
@media (prefers-reduced-motion: reduce) { .nx-gbtn:hover { transform: none; } }

/* ════════════ Cards (hub + related) ════════════ */
.nx-ggrid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
/* Hub: 5 guides read best as 3 + 2 on desktop, 2 + 2 + 1 on tablets. */
@media (min-width: 1100px) {
    .nx-ggrid--hub { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .nx-ggrid--hub > .nx-gcard { grid-column: span 2; }
    .nx-ggrid--hub > .nx-gcard:nth-child(4), .nx-ggrid--hub > .nx-gcard:nth-child(5) { grid-column: span 3; }
}
.nx-gcard {
    display: flex; flex-direction: column; gap: 12px;
    min-width: 0;
    padding: clamp(20px, 2.4vw, 28px);
    border: 1px solid var(--nx-color-line);
    border-radius: var(--nx-radius-xl);
    background: var(--nx-color-surface);
    color: var(--nx-color-text); text-decoration: none;
    transition: border-color var(--nx-dur) var(--nx-ease-out), background var(--nx-dur) var(--nx-ease-out), transform var(--nx-dur) var(--nx-ease-out);
}
.nx-gcard:hover, .nx-gcard:focus-visible {
    border-color: var(--nx-color-line-strong);
    background: var(--nx-color-surface-2);
    transform: translateY(-3px);
    color: var(--nx-color-text);
}
@media (prefers-reduced-motion: reduce) { .nx-gcard:hover, .nx-gcard:focus-visible { transform: none; } }
.nx-gcard__eyebrow {
    font-family: var(--nx-font-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--nx-color-text-muted);
}
.nx-gcard__title {
    font-family: var(--nx-font-display); font-weight: 650;
    font-size: clamp(1.12rem, 1.04rem + .35vw, 1.3rem); line-height: 1.3; letter-spacing: -.01em;
    margin: 0; color: var(--nx-color-text);
    overflow-wrap: break-word;
}
.nx-gcard__text { font-size: .95rem; line-height: 1.6; color: var(--nx-color-text-muted); flex: 1 1 auto; }
.nx-gcard__meta {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
    font-family: var(--nx-font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--nx-color-text-muted);
    padding-top: 6px;
}
.nx-gcard__go { color: var(--nx-color-text); }
.nx-gcard__go span { display: inline-block; transition: transform var(--nx-dur) var(--nx-ease-out); }
.nx-gcard:hover .nx-gcard__go span { transform: translateX(4px); }

.nx-grelated { max-width: var(--nx-w); margin: clamp(64px, 8vw, 104px) auto 0; }
.nx-grelated__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.nx-grelated__head h2 {
    font-family: var(--nx-font-display); font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
    font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--nx-color-text);
}
.nx-grelated__head a {
    font-family: var(--nx-font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    color: var(--nx-color-text-muted); text-decoration: none;
}
.nx-grelated__head a:hover { color: var(--nx-color-text); }

/* ════════════ Hub ════════════ */
.nx-ghub { max-width: var(--nx-w); margin: 0 auto; }
.nx-ghub + .nx-ghub { margin-top: clamp(64px, 8vw, 104px); }
.nx-ghub__title {
    font-family: var(--nx-font-display); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem);
    font-weight: 700; letter-spacing: -.02em; margin: 0 0 12px; color: var(--nx-color-text);
}
.nx-ghub__intro {
    max-width: 40em; margin: 0 0 28px;
    font-size: clamp(1rem, .96rem + .22vw, 1.1rem); line-height: 1.7;
    color: rgba(229, 233, 238, .74);
}
.nx-ghub__intro a { color: var(--nx-color-text); text-underline-offset: 4px; }
.nx-gsvc {
    list-style: none; margin: 0 0 24px; padding: 0;
    display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.nx-gsvc a {
    display: grid; gap: 6px; height: 100%; box-sizing: border-box; /* site has no global border-box; without this the padding overflows the row */
    padding: 18px 20px;
    border: 1px solid var(--nx-color-line);
    border-radius: var(--nx-radius-lg);
    background: var(--nx-color-surface);
    text-decoration: none; color: var(--nx-color-text);
    transition: border-color var(--nx-dur) var(--nx-ease-out), background var(--nx-dur) var(--nx-ease-out);
}
.nx-gsvc a:hover { border-color: var(--nx-color-line-strong); background: var(--nx-color-surface-2); }
.nx-gsvc strong { font-family: var(--nx-font-display); font-size: 1.02rem; font-weight: 600; }
.nx-gsvc span { font-size: .92rem; line-height: 1.55; color: var(--nx-color-text-muted); }

@media print {
    .nx-gtoc, .nx-gcta__actions, .nx-grelated { display: none !important; }
    .nx-gbody__shell { display: block; }
}

