/* TensorLynx site shell: header, mega-menu, mobile drawer, footer. Tokens come from base.css (:root). */
:root { --header-h: 68px; --tl-gut: clamp(20px, 4vw, 48px); }
.tl-wrap { width: min(var(--container-max, 1240px), 100% - 2 * var(--tl-gut)); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--text-on-accent); font-weight: 600; }
.skip-link:focus { top: 12px; }
html.tl-lock { overflow: hidden; }
main:focus { outline: none; }

/* ---- header ---- */
.tl-header { position: sticky; top: 0; z-index: 60; background: rgba(10,12,15,.6); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid transparent; transition: background .3s var(--ease-out), border-color .3s var(--ease-out); }
.tl-header.is-stuck, .tl-header.is-panel, .tl-header.is-drawer { background: rgba(10,12,15,.92); border-bottom-color: rgba(255,255,255,.07); }
.tl-bar { display: flex; align-items: center; height: var(--header-h); }
.tl-word { font: 600 1.35rem/1 var(--font-sans); letter-spacing: -.025em; color: var(--text-primary); white-space: nowrap; }
.tl-word span { color: var(--accent); }
.tl-nav { margin-left: 44px; }
.tl-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; }
.tl-trigger, .tl-link { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--text-secondary); font: 500 .9375rem/1 var(--font-sans); cursor: pointer; transition: color .2s; }
.tl-trigger svg { width: 13px; height: 13px; opacity: .7; transition: transform .25s var(--ease-out); }
.tl-trigger::after, .tl-link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.tl-trigger:hover, .tl-link:hover, .tl-item.is-open .tl-trigger, .tl-link[aria-current="page"] { color: var(--text-primary); }
.tl-item.is-open .tl-trigger::after, .tl-link[aria-current="page"]::after { transform: scaleX(1); }
.tl-item.is-open .tl-trigger svg { transform: rotate(180deg); }
.tl-trigger:focus-visible, .tl-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tl-end { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.tl-signin { color: var(--text-secondary); font-weight: 500; font-size: .9375rem; }
.tl-signin:hover { color: var(--text-primary); }
.tl-cta { padding: 10px 20px; font-size: .9rem; white-space: nowrap; }
.tl-burger { display: none; width: 42px; height: 42px; border: 1px solid var(--border-strong); border-radius: 12px; background: none; cursor: pointer; position: relative; }
.tl-burger span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--text-primary); transition: transform .3s var(--ease-out), opacity .2s; }
.tl-burger span:nth-child(1) { top: 14px; } .tl-burger span:nth-child(2) { top: 20px; } .tl-burger span:nth-child(3) { top: 26px; }
.tl-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.tl-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.tl-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- mega panel: a floating card under the header ---- */
.tl-panel { position: fixed; left: 0; right: 0; top: calc(var(--header-h) - 2px); padding-top: 14px; visibility: hidden; opacity: 0; transform: translateY(-6px) scale(.992); transform-origin: top center; pointer-events: none; transition: opacity .2s var(--ease-out), transform .26s var(--ease-out), visibility 0s linear .26s; }
.tl-item.is-open > .tl-panel, html:not(.js) .tl-item:hover > .tl-panel, html:not(.js) .tl-item:focus-within > .tl-panel { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.tl-card { position: relative; pointer-events: none; width: min(1120px, 100% - 2 * var(--tl-gut)); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr); gap: 10px; height: 392px; padding: 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 22px; background: rgba(13,17,22,.995); box-shadow: 0 40px 90px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.4); }
.tl-item.is-open .tl-card, html:not(.js) .tl-item:hover .tl-card, html:not(.js) .tl-item:focus-within .tl-card { pointer-events: auto; }
.tl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 2px 6px; align-content: center; padding: 6px; }
.tl-cap { display: grid; gap: 4px; padding: 13px 14px 14px; border-radius: 12px; transition: background .2s; }
.tl-cap:hover, .tl-cap:focus-visible { background: rgba(255,255,255,.055); outline: none; }
.tl-cap:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.tl-cap-k { font: 500 .66rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-tertiary); transition: color .2s; }
.tl-cap:hover .tl-cap-k, .tl-cap:focus-visible .tl-cap-k { color: var(--accent); }
.tl-cap strong { font: 600 .96rem/1.25 var(--font-sans); color: var(--text-primary); letter-spacing: -.005em; }
.tl-item.is-open .tl-cap { animation: tlIn .38s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 22ms + 30ms); }
@keyframes tlIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tl-feature { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 20px 22px 20px; border-radius: 16px; background: radial-gradient(120% 90% at 50% 0%, #10333a, #12181e 75%); border: 1px solid rgba(255,255,255,.06); }
.tl-ring { flex: none; width: 100%; max-width: 140px; margin: 0 auto 10px; display: block; overflow: visible; }
.tl-ring-bg { fill: none; stroke: var(--border-subtle); stroke-width: 3; }
.tl-arc { fill: none; stroke: var(--border-strong); stroke-width: 5; stroke-linecap: round; transition: stroke .25s, stroke-width .25s; }
.tl-node circle { r: 24; fill: var(--surface-0); stroke: var(--accent-border); stroke-width: 6; transition: fill .25s, stroke .25s, r .25s; }
.tl-node text { fill: var(--text-tertiary); font: 500 25px var(--font-sans); transition: fill .25s; }
.tl-ring-core { fill: var(--text-primary); font: 600 34px var(--font-sans); letter-spacing: -.02em; }
.tl-node.is-on circle { fill: var(--accent); stroke: var(--accent); r: 32; filter: drop-shadow(0 0 12px var(--accent)); }
.tl-arc.is-on { stroke: var(--accent); stroke-width: 8; }
.tl-feature-k { flex: none; margin: 6px 0 8px; font: 500 .68rem/1.3 var(--font-mono); letter-spacing: .13em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-feature-h { flex: none; margin: 0; height: 5.6em; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; font: 600 1rem/1.4 var(--font-sans); color: var(--text-primary); }
.tl-feature-go { flex: none; margin-top: auto; padding-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-feature-go a { color: var(--accent); font-weight: 500; font-size: .9rem; }
.tl-feature-go a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- mobile drawer ---- */
.tl-drawer { position: fixed; z-index: 55; inset: var(--header-h) 0 0 0; overflow-y: auto; background: var(--surface-0); padding: 8px var(--tl-gut) 40px; overscroll-behavior: contain; }
.tl-drawer[hidden] { display: none; }
.tl-acc { border-bottom: 1px solid var(--border-subtle); }
.tl-acc summary, .tl-acc-link { display: flex; justify-content: space-between; align-items: center; padding: 18px 2px; font: 600 1.15rem/1.2 var(--font-sans); color: var(--text-primary); cursor: pointer; list-style: none; border-bottom: 1px solid var(--border-subtle); }
.tl-acc summary::-webkit-details-marker { display: none; }
.tl-acc summary::after { content: ""; width: 9px; height: 9px; border: solid var(--text-secondary); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .25s; }
.tl-acc[open] summary { border-bottom-color: transparent; } .tl-acc[open] summary::after { transform: rotate(-135deg); }
.tl-acc { border-bottom: 0; }
.tl-acc-h { margin: 14px 0 4px; font: 500 .7rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.tl-acc ul { list-style: none; margin: 0 0 6px; padding: 0; }
.tl-acc li a { display: block; padding: 9px 0; color: var(--text-secondary); font-size: 1rem; }
.tl-acc-all { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 12px 0 16px; } .tl-acc-all a { color: var(--accent); font-weight: 500; }
.tl-acc-cta { width: 100%; margin-top: 26px; }

/* ---- footer ---- */
.tl-footer { border-top: 1px solid rgba(255,255,255,.07); background: var(--surface-0); padding: 72px 0 30px; }
.tl-foot-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .6fr) minmax(0, 2.3fr); gap: 48px 56px; }
.tl-foot-brand p { margin: 14px 0 0; color: var(--text-tertiary); font-size: .95rem; }
.tl-foot-col h2 { margin: 0 0 20px; font: 500 .7rem/1 var(--font-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--text-tertiary); }
.tl-foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tl-foot-caps ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 12px 32px; }
.tl-foot-col a { color: var(--text-secondary); font-size: .92rem; transition: color .2s; }
.tl-foot-col a:hover { color: var(--text-primary); }
.tl-foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.07); color: var(--text-tertiary); font-size: .82rem; }
.tl-foot-bottom p { margin: 0; }
.tl-foot-legal { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.tl-foot-legal a { color: var(--text-tertiary); transition: color .2s; } .tl-foot-legal a:hover { color: var(--text-primary); }

/* small helpers used by the added pages */
.tx-more { color: var(--accent); font-weight: 500; font-size: var(--step-sm); } .tx-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.tx-ct-route { margin: 0 0 .6rem; padding: .5rem .8rem; border-radius: 10px; background: var(--accent-soft); color: var(--text-primary); font-size: var(--step-sm); }
.tx-ct-route[hidden] { display: none; }
.tx-route .tx-badge { margin-bottom: .9rem; }

@media (max-width: 1180px) { .tl-card { grid-template-columns: minmax(0, 1fr) 250px; height: 430px; } .tl-ring { max-width: 120px; } .tl-feature-h { height: 8.4em; -webkit-line-clamp: 6; } }
@media (max-width: 1000px) {
  .tl-nav, .tl-cta, .tl-signin { display: none; }
  .tl-burger { display: block; margin-left: auto; }
  .tl-panel { display: none; }
  .tl-foot-top { grid-template-columns: 1fr 1fr; gap: 40px 32px; } .tl-foot-brand { grid-column: 1 / -1; } .tl-foot-caps { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .tl-foot-top { grid-template-columns: 1fr; } .tl-foot-caps ul { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(6, auto); } .tl-foot-bottom { flex-direction: column; align-items: flex-start; gap: 12px; } }
/* no script: the nav row stays (the drawer cannot open), wrapped under the logo */
html:not(.js) .tl-burger { display: none; }
@media (max-width: 1000px) { html:not(.js) .tl-bar { height: auto; flex-wrap: wrap; padding-block: 10px; } html:not(.js) .tl-nav { display: block; width: 100%; order: 3; margin-left: 0; } html:not(.js) .tl-list { flex-wrap: wrap; } html:not(.js) .tl-panel { display: none; } }
@media (prefers-reduced-motion: reduce) { .tl-header, .tl-panel, .tl-trigger svg, .tl-trigger::after, .tl-link::after, .tl-node circle, .tl-arc, .tl-cap { transition: none !important; animation: none !important; } }

/* Capabilities hero figure: the loop ring, each node a link to its stage */
.cap-fig { margin: 0; align-self: center; }
.cap-ring { max-width: 520px; }
.cap-ring a { cursor: pointer; }
.cap-ring .tl-node text { font-size: 24px; fill: var(--text-secondary); }
.cap-ring .tl-node circle { stroke: var(--accent); }
.cap-ring a:hover .tl-node circle, .cap-ring a:focus-visible .tl-node circle { fill: var(--accent); filter: drop-shadow(0 0 10px var(--accent)); r: 19; }
.cap-ring a:hover .tl-node text, .cap-ring a:focus-visible .tl-node text { fill: var(--text-primary); }
.cap-ring a:focus-visible { outline: none; }
.cap-ring .tl-arc { stroke: var(--accent-border); }
@media (max-width: 999px) { .cap-fig { max-width: 420px; margin-inline: auto; } }

/* headlines break between words, never inside one */
.tx-h1, .tx-h2, .tx-h3 { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; }
.cap-ring .tl-node circle { r: 15; stroke-width: 3; } .cap-ring .tl-arc { stroke-width: 3; } .cap-ring .tl-ring-bg { stroke-width: 2; }
.cap-ring a:hover .tl-node circle, .cap-ring a:focus-visible .tl-node circle { r: 19; }
