/* Cavalier Capital — shared layer loaded after each page's own styles.
   Language toggle, mobile menu, mobile layout fixes, code windows that no longer change size while typing,
   transaction cards. */

html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:clip}
img{max-width:100%}

/* ---------- header ---------- */
/* the header's entrance animation must not stay applied once finished: a lingering transform
   would trap the full-screen mobile menu inside the header (iOS and Chrome) */
.navin{animation-fill-mode:backwards!important}
.hd nav{margin-left:auto}
.lang{display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid rgba(200,208,229,.32);border-radius:999px;font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;font-size:11px;letter-spacing:.08em;flex:0 0 auto}
.lang a{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:28px;padding:0 7px;border-radius:999px;color:#c8d0e5;text-decoration:none;transition:background .25s,color .25s}
.lang a:hover{color:#ffffff}
.lang a[aria-current]{background:#ffffff;color:#1b2731;pointer-events:none}
.hd{gap:24px!important}
.hd nav{gap:24px!important}
.hd nav > a:last-child{padding:0 20px!important}

/* burger mode: below 1240px the full navigation no longer fits on one line */
@media (max-width: 1260px){
  .burger{display:flex!important;flex:0 0 auto;order:3}
  .lang{order:2;margin-left:auto}
  .hd{height:68px!important;padding:0 24px!important;gap:12px!important;flex-wrap:nowrap!important}
  .hd > a:first-child img:first-child{height:32px!important}
  .hd > a:first-child img:last-child{height:13px!important}
  header .hd nav{display:flex!important;position:fixed!important;top:68px;left:0;right:0;bottom:0;z-index:70;margin:0;
    flex-direction:column;align-items:stretch!important;justify-content:flex-start;gap:0!important;flex-wrap:nowrap!important;
    padding:12px 24px calc(32px + env(safe-area-inset-bottom))!important;background:#1b2731;border-top:1px solid rgba(200,208,229,.15);
    overflow-y:auto;overscroll-behavior:contain;
    visibility:hidden;opacity:0;transform:translateY(-10px);transition:opacity .35s cubic-bezier(.22,1,.36,1),transform .45s cubic-bezier(.22,1,.36,1),visibility 0s linear .45s}
  header.open .hd nav{visibility:visible;opacity:1;transform:none;transition:opacity .35s cubic-bezier(.22,1,.36,1),transform .45s cubic-bezier(.22,1,.36,1),visibility 0s}
  header .hd nav a{display:flex!important;align-items:center;padding:0!important;min-height:60px;font-size:24px!important;font-weight:500!important;letter-spacing:-.01em;border-bottom:1px solid rgba(200,208,229,.12);color:#ffffff!important}
  header .hd nav .navlink::after{display:none}
  header .hd nav a:last-of-type{justify-content:center;margin-top:28px;min-height:56px;height:56px!important;border-bottom:0;font-size:16px!important;background:#ffffff;color:#1b2731!important;border-radius:999px}
  html.menu-open{overflow:hidden}
  header{z-index:60}
}
@media (max-width: 900px){
  header nav{top:68px!important}
}
@media (max-width: 420px){
  .hd > a:first-child{gap:10px!important;min-width:0}
  .hd > a:first-child img:first-child{height:28px!important}
  .hd > a:first-child img:last-child{height:11px!important}
  .lang a{min-width:30px;height:26px;padding:0 6px}
  .hd{padding:0 16px 0 20px!important}
}

/* ---------- touch screens: no sticky hover states ---------- */
@media (hover: none){
  .xrow:hover{background:transparent!important;padding-left:0!important}
  .card:hover,.feat:hover,.btn:hover,.tx:hover{transform:none!important}
  #team .card:hover > div:first-child{transform:none!important}
}

/* ---------- code windows: fixed size while the text types in ---------- */
.ty-rest{visibility:hidden}
.ty-cur{position:relative;display:inline}
.ty-cur::after{content:"";position:absolute;left:2px;top:.1em;width:.62em;height:1.05em;background:#c8d0e5;animation:blink 1s steps(1) infinite}
@keyframes blink{50%{opacity:0}}
/* wrapped lines align after the line number instead of under it */
.code > div:not(:first-child){padding-left:38px;text-indent:-38px}
#codeblock .code > div{padding-left:0;text-indent:0}
#codeblock .code .cl{padding-left:54px;text-indent:-54px}
.code .ln,.code .ty-cur{text-indent:0}
.code > div[style*="display: flex"]{padding-left:0!important;text-indent:0!important}

/* ---------- small screens ---------- */
@media (max-width: 900px){
  /* back links above page titles */
  .backrow{padding-top:28px!important;padding-bottom:0!important}
  .backrow + div{padding-top:20px!important}
  h1{overflow-wrap:break-word;hyphens:manual}
  .code{font-size:11.5px!important;line-height:1.8!important}
  .code > div:not(:first-child){padding-left:30px;text-indent:-30px}
  .code .ln{width:18px!important;margin-right:12px!important}
  #codeblock .code > div{padding-left:0;text-indent:0}
  #codeblock .code .cl{padding-left:34px;text-indent:-34px}
  #codeblock .code .ln{width:22px!important;margin-right:12px!important}

  /* home hero */
  #top > div{padding-top:56px!important;gap:48px!important}
  #top h1{font-size:42px!important;line-height:1!important}
  #top .h1l{min-height:2em}
  #top p{font-size:17px!important}
  #top .rise > a.btn{height:52px!important;padding:0 24px!important}
  .kp{gap:20px!important}
  .kp > div{grid-template-rows:auto!important;row-gap:6px!important;min-width:0}
  .kp .num{font-size:44px!important;line-height:48px!important}
  .kp > div > div:nth-child(2){font-size:12px!important;line-height:16px!important;letter-spacing:.1em!important}
  .kp > div > div:nth-child(3){font-size:13px!important;line-height:17px!important}
  #top .rise[style*="padding-bottom: 112px"]{padding-bottom:64px!important;gap:40px!important}
  .dogbg{transform:none!important}

  /* home sections */
  #who-we-are > div{gap:36px!important}
  #who-we-are [style*="repeat(3, minmax(0, 1fr))"]{grid-template-columns:1fr!important;gap:22px!important}
  .xrow.ins{grid-template-columns:1fr auto!important;grid-template-areas:"d c" "t t";gap:8px 16px!important;padding:22px 0!important}
  .xrow.ins > :nth-child(1){grid-area:d}
  .xrow.ins > :nth-child(2){grid-area:t;font-size:19px!important}
  .xrow.ins > :nth-child(3){grid-area:c;text-align:right!important}
  #team .card > div:first-child{height:300px!important}
  #contact > div{padding-top:80px!important}
  #cdog{height:380px!important;right:-60px!important}

  /* tables of past transactions (team pages) */
  .deal-head{display:none!important}

  /* footers */
  footer > div{gap:28px!important}
}

/* ---------- transactions ---------- */
.tx{display:grid;grid-template-rows:auto 1fr auto;gap:22px;background:#ffffff;border:1px solid #e6e6e6;border-radius:16px;padding:26px 26px 22px;text-decoration:none;color:inherit;min-height:300px;transition:transform .5s cubic-bezier(.22,1,.36,1),border-color .5s,box-shadow .5s}
.tx:hover{transform:translateY(-6px);border-color:#c8d0e5;box-shadow:0 18px 40px -24px rgba(27,39,49,.35)}
.tx-top{display:flex;justify-content:space-between;gap:12px;font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:#656c80}
.tx-top .t{color:#495a69}
.tx-mid{display:flex;flex-direction:column;justify-content:center;gap:16px}
.tx-logo{height:56px;display:flex;align-items:center}
.tx-logo img{height:48px;max-width:200px;width:auto;object-fit:contain;object-position:left center}
.tx-word{font-size:26px;line-height:1.05;font-weight:700;letter-spacing:-.02em;color:#1b2731}
.tx-desc{font-size:14px;line-height:1.5;color:#3c464f}
.tx-cp{display:flex;align-items:center;gap:12px;padding-top:16px;border-top:1px solid #e6e6e6;min-height:44px}
.tx-cp .lbl{font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#656c80;flex:0 0 auto}
.tx-cp .who{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;min-width:0}
.tx-cp img{height:26px;max-width:120px;width:auto;flex:0 0 auto;object-fit:contain}
.tx-cp .nm{font-size:14px;font-weight:600;color:#1b2731}
.tx-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
@media (max-width: 1080px){ .tx-grid{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width: 640px){ .tx-grid{grid-template-columns:1fr} .tx{min-height:0} }

/* transaction page */
.txh{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:56px;align-items:start}
.txcard{background:#ffffff;border:1px solid #e6e6e6;border-radius:18px;padding:34px 32px;display:flex;flex-direction:column;gap:22px;box-shadow:0 30px 60px -40px rgba(27,39,49,.45)}
.txcard .big img{height:64px;max-width:260px;width:auto;object-fit:contain;object-position:left center;align-self:flex-start}
.txcard .big .tx-word{font-size:34px}
.txcard .rel{display:flex;align-items:center;gap:14px;font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#656c80}
.txcard .rel::before,.txcard .rel::after{content:"";flex:1;height:1px;background:#e6e6e6}
.txcard .cps{display:flex;flex-wrap:wrap;gap:18px 28px;align-items:center}
.txcard .cps img{height:40px;max-width:200px;width:auto;object-fit:contain}
.txcard .cps .nm{font-size:20px;font-weight:700;color:#1b2731;letter-spacing:-.01em}
.txcard .role{display:flex;align-items:center;gap:10px;padding-top:18px;border-top:1px solid #e6e6e6;font-size:13px;color:#3c464f}
.txcard .role img{height:22px;width:auto}
.txfacts{background:#ffffff;border:1px solid #e6e6e6;border-radius:8px;padding:16px 18px;font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;font-size:12.5px;line-height:1.85;color:#1b2731}
.txfacts > div{display:flex;gap:10px}
.txfacts .k{color:#495a69;flex:0 0 110px}
.txfacts .c{color:#c6c8d1}
.txbody p{margin:0 0 20px;font-size:18px;line-height:1.7;color:#3c464f}
.txbody ul,.txbody ol{margin:0 0 20px;padding-left:22px;font-size:18px;line-height:1.7;color:#3c464f}
.txbody h2,.txbody h3{margin:32px 0 12px;font-size:22px;line-height:1.25;font-weight:700;color:#1b2731}
.txbody strong,.txbody b{color:#1b2731;font-weight:600}
.txbody a{color:#495a69}
.txquote{margin:8px 0 0;padding:0 0 0 28px;border-left:3px solid #c8d0e5}
.txquote p{margin:0 0 14px;font-size:24px;line-height:1.35;font-weight:600;color:#1b2731}
.txquote footer{all:unset;display:block;font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;font-size:12px;color:#656c80}
.txteam{display:flex;flex-wrap:wrap;gap:28px}
.txteam a{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit}
.txteam img{width:44px;height:44px;border-radius:50%;object-fit:cover;object-position:center 30%}
@media (max-width: 900px){
  .txh{grid-template-columns:1fr;gap:36px}
  .txcard{padding:26px 22px}
  .txfacts .k{flex-basis:100px}
  .txbody p,.txbody ul,.txbody ol{font-size:17px}
  .txquote p{font-size:20px}
}
