/* =========================================================================
   Trust Center — sidebar layout + content sections.
   ========================================================================= */

html { scroll-behavior: smooth; }

/* ---- Shell ------------------------------------------------------------- */

.tc-shell {
    background: var(--main-bg-color);
    color: var(--inv-bg-color);
    padding: 5rem 0 7rem;
    min-height: 100vh;
    position: relative;
    /* `overflow-x: clip` prevents the page from scrolling horizontally if
       any descendant misbehaves, without breaking position:sticky on the
       sidebar (which `overflow: hidden` would). */
    overflow-x: clip;
}

.tc-shell-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 5rem;
    align-items: start;
}

/* ---- Sidebar nav ------------------------------------------------------- */

.tc-nav {
    position: sticky;
    top: 6rem;
    align-self: start;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0.25rem 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.2s ease;
}
.tc-nav:hover { scrollbar-color: var(--grey-accent-color) transparent; }
.tc-nav::-webkit-scrollbar { width: 4px; }
.tc-nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.tc-nav:hover::-webkit-scrollbar-thumb { background: var(--grey-accent-color); }

.tc-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tc-nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--inv-bg-color);
    opacity: 0.72;
    text-decoration: none !important;
    border-left: 2px solid transparent;
    margin-left: -2px;
    border-radius: 0 6px 6px 0;
    transition:
        opacity 0.15s ease,
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
}

.tc-nav-link:hover {
    opacity: 1;
    background: rgba(127, 127, 127, 0.05);
}

.tc-nav-link.is-active {
    opacity: 1;
    font-weight: 600;
    color: var(--purple);
    background: rgba(99, 102, 241, 0.09);
    border-left-color: var(--purple);
}

.tc-nav-link.is-active:hover {
    background: rgba(99, 102, 241, 0.12);
}

/* Mobile picker is hidden on desktop. */
.tc-nav-picker { display: none; }

/* ---- Main column ------------------------------------------------------- */

.tc-main {
    min-width: 0;
    padding-top: 0.25rem;
    transition: opacity 0.15s ease;
}

.tc-main.tc-loading {
    opacity: 0.35;
    pointer-events: none;
}

.tc-page {
    max-width: 720px;
}

/* ---- Sections + typography -------------------------------------------- */

.tc-section {
    margin: 0 0 6.5rem;
    scroll-margin-top: 6rem;
}

.tc-section:last-child { margin-bottom: 0; }

.tc-h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 1.4rem;
    color: var(--inv-bg-color);
}

.tc-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 4rem 0 1.1rem;
    color: var(--inv-bg-color);
    scroll-margin-top: 6rem;
}

.tc-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 2.25rem 0 0.6rem;
    color: var(--inv-bg-color);
    opacity: 0.95;
}

.tc-section p {
    font-size: 0.96rem;
    line-height: 1.8;
    color: var(--inv-bg-color);
    opacity: 0.75;
    margin: 0 0 1.3rem;
}

.tc-section ul,
.tc-section ol {
    padding-left: 1.25rem;
    margin: 0 0 1.5rem;
}

.tc-section li {
    font-size: 0.96rem;
    line-height: 1.75;
    color: var(--inv-bg-color);
    opacity: 0.75;
    margin: 0 0 0.55rem;
}

.tc-section li::marker { color: var(--purple); opacity: 0.55; }

/* Inline anchors get a subtle underline only when they're inside body copy.
   Cards / nav / pills / footer all opt out via !important above. */
.tc-section p a,
.tc-section li a,
.tc-section td a {
    color: var(--purple);
    text-decoration: underline;
    text-decoration-color: rgba(99, 102, 241, 0.4);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: text-decoration-color 0.18s ease;
}

.tc-section p a:hover,
.tc-section li a:hover,
.tc-section td a:hover {
    text-decoration-color: var(--purple);
}

.tc-lede {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--inv-bg-color);
    opacity: 0.75;
    margin: 0 0 3rem;
    max-width: 580px;
}

/* ---- Trust signal chips (overview) ------------------------------------
   Compact informational chips. Not interactive, not navigation. min() lets
   the grid shrink below preferred width on narrow viewports instead of
   forcing horizontal scroll. */

.tc-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 0;
    margin: 0 0 3rem;
    padding: 0;
    border: 1px solid var(--grey-accent-color);
    border-radius: 12px;
    overflow: hidden;
}

.tc-chip {
    position: relative;
    padding: 1.15rem 1.35rem 1.2rem;
    margin: 0;
    /* Natural flow stacks label → value with the label's bottom margin
       between them. No justify-content / min-height: grid already equalizes
       chip heights across the row, and we want every value top-aligned —
       single-line values shouldn't float to the bottom of taller chips. */
}

/* Inset vertical dividers between cells — stop short of the top/bottom edges
   so the strip reads as institutional, not as a hard-edged table. */
@media (min-width: 961px) {
    .tc-chip:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 22%;
        bottom: 22%;
        right: 0;
        width: 1px;
        background: var(--grey-accent-color);
    }
}

/* Mobile: chips stack vertically, so dividers go horizontal between rows. */
@media (max-width: 960px) {
    .tc-chip:not(:last-child) {
        border-bottom: 1px solid var(--grey-accent-color);
    }
}

.tc-chip-label {
    display: flex;
    align-items: center;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--inv-bg-color);
    opacity: 0.55;
    margin: 0 0 0.65rem;
}

/* Small operational signal — a thin accent rule preceding each label. */
.tc-chip-dot {
    display: inline-block;
    width: 2px;
    height: 0.7rem;
    margin-right: 0.55rem;
    background: var(--purple);
    flex-shrink: 0;
}

.tc-chip-value {
    display: block;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--inv-bg-color);
    opacity: 0.95;
    margin: 0;
    line-height: 1.35;
}

/* Link anchors inside chips inherit the chip's color so the chip row reads
   as a uniform data table, not a mix of "labels" and "blue links". Hover
   reveals interactivity with a subtle purple underline. */
.tc-chip-value a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.tc-chip-value a:hover,
.tc-chip-value a:focus-visible {
    color: var(--purple);
    border-bottom-color: var(--purple);
    outline: none;
}

/* ---- Requests / contact list ------------------------------------------ */

.tc-contact {
    margin: 0 0 2rem;
    padding: 0;
    border-top: 1px solid var(--grey-accent-color);
}

.tc-contact-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--grey-accent-color);
}

.tc-contact-row dt {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--inv-bg-color);
    opacity: 0.85;
    margin: 0;
}

.tc-contact-row dd {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--inv-bg-color);
    opacity: 0.75;
}

.tc-contact-row dd a {
    color: var(--purple);
    text-decoration: underline;
    text-decoration-color: rgba(99, 102, 241, 0.4);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.tc-contact-row dd a:hover { text-decoration-color: var(--purple); }

@media (max-width: 640px) {
    .tc-contact-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        padding: 0.85rem 0;
    }
}

/* ---- Cards ------------------------------------------------------------ */

.tc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.25rem;
    margin: 0 0 3rem;
}

.tc-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 1px solid var(--grey-accent-color);
    border-radius: 10px;
    background: var(--off-bg-color);
    text-decoration: none !important;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.tc-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: var(--off-bg-color);
}

.tc-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--inv-bg-color);
    margin: 0 0 0.55rem;
    letter-spacing: -0.01em;
}

.tc-card-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--inv-bg-color);
    opacity: 0.68;
    margin: 0 0 1.5rem;
}

.tc-card-cta {
    margin-top: auto;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--purple);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.25s ease;
}

.tc-card:hover .tc-card-cta { gap: 0.6rem; }

/* ---- Subprocessor cards -----------------------------------------------
   Reshaped from an 8-column table to a card grid. A wide table forced
   horizontal scrolling on anything narrower than ~1100px and trapped users
   into scrolling all the way down to find the bottom scrollbar. The card
   layout works at every viewport with no horizontal scroll. */

.tc-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    gap: 1rem;
    margin: 0 0 2.5rem;
}

.tc-sub-card {
    border: 1px solid var(--grey-accent-color);
    border-radius: 12px;
    background: var(--off-bg-color);
    padding: 1.35rem 1.45rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.tc-sub-head {
    margin: 0 0 1.1rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid var(--grey-accent-color);
}

.tc-sub-name {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--inv-bg-color);
    line-height: 1.25;
}

.tc-sub-cat {
    margin: 0;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--inv-bg-color);
    opacity: 0.5;
}

.tc-sub-fields {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
    gap: 0.55rem 1rem;
    align-items: baseline;
}

.tc-sub-fields dt {
    margin: 0;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--inv-bg-color);
    opacity: 0.5;
    padding-top: 0.2rem;
}

.tc-sub-fields dd {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--inv-bg-color);
    opacity: 0.88;
}

@media (max-width: 480px) {
    .tc-sub-card { padding: 1.15rem 1.2rem; }
    .tc-sub-fields {
        grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
        gap: 0.5rem 0.85rem;
    }
}

.tc-pill {
    display: inline-block;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.tc-pill--yes { background: rgba(99, 102, 241, 0.12); color: var(--purple); }
.tc-pill--no  { background: rgba(125, 125, 125, 0.1);  color: var(--inv-bg-color); opacity: 0.55; }
.tc-pill--req { background: rgba(99, 102, 241, 0.12); color: var(--purple); }
.tc-pill--opt { background: rgba(125, 125, 125, 0.1);  color: var(--inv-bg-color); opacity: 0.7;  }

/* ---- Callout ---------------------------------------------------------- */

.tc-callout {
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.04);
    border-radius: 12px;
    margin: 0 0 2rem;
}

.tc-callout p:last-child { margin-bottom: 0; }

.tc-callout-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--purple);
    margin: 0 0 0.5rem;
}

/* ---- Dump page -------------------------------------------------------- */

.tc-dump {
    background: var(--main-bg-color);
    color: var(--inv-bg-color);
    padding: 7rem 0 6rem;
    min-height: 100vh;
}

.tc-dump-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.tc-dump-toc {
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--grey-accent-color);
    border-radius: 14px;
    background: var(--off-bg-color);
    margin: 0 0 4rem;
}

.tc-dump-toc-title {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--purple);
    margin: 0 0 0.85rem;
}

.tc-dump-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 1.75rem;
}

.tc-dump-toc-list li { margin: 0 0 0.5rem; break-inside: avoid; }
.tc-dump-toc-list a {
    font-size: 0.88rem;
    color: var(--inv-bg-color);
    opacity: 0.8;
    text-decoration: none !important;
    transition: color 0.18s ease, opacity 0.18s ease;
}
.tc-dump-toc-list a:hover { color: var(--purple); opacity: 1; }

.tc-dump-divider {
    border: 0;
    border-top: 1px solid var(--grey-accent-color);
    margin: 4rem 0;
}

/* ---- Responsive — tablet & mobile (≤960px) ---------------------------
   Mobile drops the sidebar entirely and replaces it with a native
   <select> picker. Native OS picker UI, zero overflow risk, one row of
   vertical space, no horizontal scrolling tabs. The marketing shell has
   a position:fixed site header that is 60px tall with z-index 10
   (see .site-header in tidyTemplate.css). */

@media (max-width: 960px) {
    .tc-shell {
        /* Picker is fixed (out of flow); the top padding on .tc-main below
           carries the full chrome offset (site header + picker). Shell only
           needs bottom breathing room here. */
        padding: 0 0 4rem;
    }

    .tc-shell-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 0;
    }

    /* Hide the desktop sidebar list. */
    .tc-nav-list { display: none; }

    /* The <aside> only wraps the picker on mobile. */
    .tc-nav {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0;
        margin: 0;
    }

    /* Picker bar — fixed to the viewport just below the 60px fixed site
       header. position:fixed (rather than sticky) so it stays available
       across the entire scroll length of the trust center, not just for
       the height of its .tc-nav parent. z-index < 10 keeps the site
       header above it when both render. */
    .tc-nav-picker {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 5;
        background: var(--main-bg-color);
        padding: 0.75rem 1.25rem;
        border-bottom: 1px solid var(--grey-accent-color);
    }

    /* ---- Custom trigger button ---- */
    .tc-nav-trigger {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        width: 100%;
        box-sizing: border-box;
        padding: 0.7rem 0.95rem 0.7rem 1rem;
        font-family: inherit;
        text-align: left;
        color: var(--inv-bg-color);
        background: var(--off-bg-color);
        border: 1px solid var(--grey-accent-color);
        border-radius: 10px;
        cursor: pointer;
        transition: border-color 0.15s ease, background 0.15s ease;
    }

    .tc-nav-trigger:hover { border-color: color-mix(in srgb, var(--purple) 35%, var(--grey-accent-color)); }
    .tc-nav-trigger:focus-visible {
        outline: 2px solid var(--purple);
        outline-offset: 2px;
    }

    .tc-nav-trigger-text {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
        min-width: 0;
    }

    .tc-nav-trigger-kicker {
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: var(--inv-bg-color);
        opacity: 0.5;
    }

    .tc-nav-trigger-current {
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: -0.005em;
        color: var(--inv-bg-color);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tc-nav-trigger-chevron {
        flex-shrink: 0;
        color: var(--inv-bg-color);
        opacity: 0.55;
        transition: transform 0.2s ease, opacity 0.15s ease;
    }

    .tc-nav-trigger[aria-expanded="true"] .tc-nav-trigger-chevron {
        transform: rotate(-180deg);
        opacity: 0.95;
    }

    .tc-nav-trigger[aria-expanded="true"] {
        border-color: color-mix(in srgb, var(--purple) 45%, var(--grey-accent-color));
    }

    /* ---- Dropdown panel — glassmorphism, matching marketing topnav ---- */
    .tc-nav-menu {
        position: absolute;
        top: calc(100% - 0.25rem);
        left: 1.25rem;
        right: 1.25rem;
        z-index: 11;
        padding: 0.4rem;
        background: color-mix(in srgb, var(--main-bg-color) 95%, transparent);
        backdrop-filter: blur(24px) saturate(1.4);
        -webkit-backdrop-filter: blur(24px) saturate(1.4);
        border: 1px solid color-mix(in srgb, var(--inv-bg-color) 8%, transparent);
        border-radius: 14px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
        opacity: 0;
        transform: scale(0.97) translateY(-4px);
        transform-origin: top center;
        pointer-events: none;
        transition:
            opacity 0.18s ease,
            transform 0.18s ease,
            visibility 0s linear 0.18s;
        visibility: hidden;
    }

    .tc-nav-trigger[aria-expanded="true"] + .tc-nav-menu {
        opacity: 1;
        transform: scale(1) translateY(0);
        pointer-events: auto;
        visibility: visible;
        transition:
            opacity 0.18s ease,
            transform 0.18s ease,
            visibility 0s linear 0s;
    }

    .tc-nav-menu-item {
        display: block;
        padding: 0.7rem 0.85rem;
        font-size: 0.92rem;
        font-weight: 500;
        line-height: 1.3;
        color: var(--inv-bg-color);
        opacity: 0.78;
        text-decoration: none !important;
        border-radius: 8px;
        transition: background 0.12s ease, opacity 0.12s ease, color 0.12s ease;
    }

    .tc-nav-menu-item:hover {
        background: var(--off-bg-color);
        opacity: 1;
    }

    .tc-nav-menu-item.is-active {
        color: var(--purple);
        font-weight: 600;
        opacity: 1;
        background: color-mix(in srgb, var(--purple) 10%, transparent);
    }

    .tc-nav-menu-item--sub {
        padding-left: 1.6rem;
        font-size: 0.88rem;
        opacity: 0.68;
    }

    .tc-nav-menu-divider {
        height: 1px;
        margin: 0.35rem 0.5rem;
        background: color-mix(in srgb, var(--inv-bg-color) 8%, transparent);
    }

    .tc-main {
        /* 60px fixed site header + ~80px fixed picker + breathing room.
           Everything above the H1 is fixed and out of flow. */
        padding: calc(60px + 80px + 1.5rem) 1.25rem 0;
        min-width: 0;
    }

    .tc-page {
        max-width: none;
    }

    /* Anchors should not land under the fixed header + fixed picker. */
    .tc-section,
    .tc-section h2 { scroll-margin-top: calc(60px + 80px + 1rem); }

    .tc-section { margin-bottom: 4.5rem; }
    .tc-h1      { font-size: 1.9rem; line-height: 1.18; margin-bottom: 1.15rem; }
    .tc-lede    { font-size: 1rem; margin-bottom: 2.25rem; }
    .tc-section h2 { font-size: 1.2rem; margin-top: 3rem; }

    .tc-cards, .tc-signals { gap: 0.85rem; }
    .tc-card    { padding: 1.4rem; }

    /* Dump page has no sticky picker — give it normal top padding. */
    .tc-dump        { padding: 5rem 0 4rem; }
    .tc-dump-inner  { padding: 0 1.25rem; }
    .tc-dump-toc    { padding: 1.25rem; }
    .tc-dump-toc-list { columns: 1; }
}

/* ---- Small phones (≤480px) ------------------------------------------- */

@media (max-width: 480px) {
    .tc-main         { padding-left: 1rem; padding-right: 1rem; }
    .tc-nav-picker   { padding-left: 1rem; padding-right: 1rem; }
    .tc-h1           { font-size: 1.55rem; }
    .tc-lede         { font-size: 0.95rem; margin-bottom: 1.75rem; }
    .tc-section h2   { font-size: 1.1rem; }
    .tc-card         { padding: 1.2rem; border-radius: 14px; }
    .tc-signal       { padding: 0.9rem 1rem; }
    .tc-callout      { padding: 1rem 1.1rem; }
}

/* ---- Shared responsibility two-column layout -------------------------
   Used on the Security page to contrast CustomerNode-side vs. tenant-side
   responsibilities. Collapses to a single column on narrow viewports. */

.tc-shared-resp {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.25rem;
    margin: 0 0 2rem;
}

.tc-shared-resp > div {
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--grey-accent-color);
    border-radius: 10px;
    background: var(--off-bg-color);
}

.tc-shared-resp h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--inv-bg-color);
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}

.tc-shared-resp ul {
    margin: 0;
    padding-left: 1.1rem;
}

.tc-shared-resp li {
    margin-bottom: 0.5rem;
    line-height: 1.55;
}

.tc-shared-resp li:last-child { margin-bottom: 0; }
