/* One header (.sh) and one footer (.sf) for every page. Markup: src/lib/chrome.ts */
@font-face{font-family:'Rw Archivo';src:url(/fonts/archivo-latin-wght-normal.woff2) format('woff2');font-weight:100 900;font-display:swap}
@font-face{font-family:'Rw Mono';src:url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2');font-weight:500;font-display:swap}
.sh,.sf{--c-ink:#0d0d0c;--c-line:#2d2b27;--c-text:#ece8df;--c-dim:#a39d91;--c-faint:#6f6a60;--c-amber:#ffa62b;font-family:'Rw Archivo',system-ui,sans-serif;color:var(--c-text);-webkit-font-smoothing:antialiased}
.sh *,.sf *{box-sizing:border-box}
.sh a,.sf a{text-decoration:none}

/* header */
/* no backdrop blur: it would pin the phone drawer and the account sheet to the header instead of the screen */
.sh{position:sticky;top:0;z-index:50;background:#0d0d0c;border-bottom:1px solid var(--c-line)}
.sh--over{position:relative;background:transparent;border-bottom-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}
/* full width on every page, the same as the terminal */
.sh-wrap{max-width:none;margin:0;padding:0 24px;height:64px;display:flex;align-items:center;gap:28px;position:relative}
.sh-logo{display:inline-flex;align-items:center;gap:10px;color:var(--c-text);font:700 19px/1 'Rw Archivo',system-ui,sans-serif;letter-spacing:-.01em;flex:none}
.sh-logo .sh-mark,.sf .sh-mark{width:28px;height:28px;display:block}
.sh-nav{display:flex;align-items:stretch;gap:24px;height:100%}
.sh-nav a{display:flex;align-items:center;color:var(--c-dim);font:500 15px 'Rw Archivo',system-ui,sans-serif;border-bottom:2px solid transparent;padding-top:2px}
.sh-nav a:hover{color:var(--c-text)}
.sh-nav a[aria-current]{color:var(--c-text);border-bottom-color:var(--c-amber)}
.sh-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.sh-cta{display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 16px;border-radius:10px;background:var(--c-amber);color:#1a1208!important;font:700 14px 'Rw Archivo',system-ui,sans-serif;white-space:nowrap}
.sh-cta:hover{filter:brightness(1.06)}
.sh-menu{display:none}
.sh-menu summary{list-style:none;width:44px;height:44px;border:1px solid var(--c-line);border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;cursor:pointer}
.sh-menu summary::-webkit-details-marker{display:none}
.sh-menu summary i{display:block;width:16px;height:1.6px;background:var(--c-text);border-radius:1px;transition:transform .2s,opacity .2s}
.sh-menu[open] summary i:nth-child(1){transform:translateY(5.6px) rotate(45deg)}
.sh-menu[open] summary i:nth-child(2){opacity:0}
.sh-menu[open] summary i:nth-child(3){transform:translateY(-5.6px) rotate(-45deg)}
.sh-panel{position:absolute;top:100%;left:0;right:0;background:var(--c-ink);border-bottom:1px solid var(--c-line);padding:4px 16px 16px;display:flex;flex-direction:column}
.sh-panel a{display:flex;align-items:center;min-height:48px;color:var(--c-text);font:500 16px 'Rw Archivo',system-ui,sans-serif;border-bottom:1px solid #1f1e1c}
.sh-panel a[aria-current]{color:var(--c-amber)}
.sh-panel .sh-cta-wide{display:none;margin-top:12px;height:46px;border:0}
@media (max-width:1023px){.sh-wrap{gap:18px}.sh-nav{gap:16px}}
@media (max-width:760px){
  .sh-wrap{height:56px;padding:0 16px;gap:10px}
  .sh-nav{display:none}
  .sh-menu{display:block;order:-1}
  .sh-right{margin-left:auto}
  /* the page menu slides in from the left under the header, the page dims behind it */
  .sh-panel{position:fixed;top:56px;bottom:0;left:0;right:auto;width:min(300px,84vw);padding:8px 18px 18px;border-right:1px solid var(--c-line);border-bottom:0;overflow-y:auto;}
  /* the dim layer covers the page beside the drawer, not the header above it */
  .sh-menu[open] summary::after{content:'';position:fixed;top:56px;left:0;right:0;bottom:0;background:rgba(0,0,0,.68);cursor:default}
  .sh-legal{margin-top:auto;padding-top:18px;display:flex;flex-wrap:wrap;gap:4px 16px}
  .sh-legal a{min-height:44px;border:0;font-size:14px;color:var(--c-dim);display:inline-flex;align-items:center;padding-right:6px}
  .sh-legal .ico{width:16px;height:16px;margin-right:7px}
  /* the agent has its own round button at the bottom of the terminal on a phone */
  .sh-right .ask-agent{display:none}
  /* the person's menu opens as a sheet from the bottom */
  .sh .account-menu{position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;max-height:80vh;overflow-y:auto;border-radius:20px 20px 0 0;box-shadow:0 0 0 100vmax rgba(0,0,0,.6);animation:sh-up .22s ease-out}
}
@keyframes sh-up{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
.sh-legal{display:none}
@media (max-width:760px){.sh-legal{display:flex}}
@media (max-width:400px){.sh-right .sh-cta{display:none}.sh-panel .sh-cta-wide{display:flex}}

/* footer */
.sf{background:#0b0b0a;border-top:1px solid var(--c-line);margin-top:64px;position:relative;z-index:1}
/* full width, lined up with the header */
.sf-wrap{max-width:none;margin:0;padding:0 24px}
.sf-cols{display:grid;grid-template-columns:1.6fr repeat(4,1fr);gap:32px;padding:44px 0 28px}
.sf-about p{color:var(--c-dim);font-size:14px;line-height:1.55;margin:14px 0;max-width:34ch}
.sf-paper{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--c-line);border-radius:999px;padding:6px 12px;font:500 12px 'Rw Mono',monospace;color:var(--c-dim)}
.sf-paper i{width:7px;height:7px;border-radius:50%;background:var(--c-amber)}
.sf h4{margin:0 0 10px;font:500 11px 'Rw Mono',monospace;letter-spacing:.08em;text-transform:uppercase;color:var(--c-faint)}
.sf ul{list-style:none;margin:0;padding:0}
.sf li a{display:inline-block;padding:4px 0;color:var(--c-dim);font-size:14px}
.sf li a:hover{color:var(--c-text)}
/* partner badges: a quiet strip that drifts sideways, colour on hover */
.sf-featured{border-top:1px solid var(--c-line);overflow:hidden;padding:12px 0;-webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.sf-track{display:flex;width:max-content;animation:sf-drift 40s linear infinite}
.sf-featured:hover .sf-track{animation-play-state:paused}
.sf-run{display:flex;gap:8px;padding-right:8px}
.sf-badge{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px 0 6px;border:1px solid rgba(255,255,255,.07);background:transparent;border-radius:9px;color:var(--c-dim);font:500 12.5px 'Rw Archivo',system-ui,sans-serif;white-space:nowrap;opacity:.55;transition:opacity .3s,border-color .3s}
.sf-badge:hover,.sf-badge:focus-visible{opacity:.9;border-color:rgba(255,255,255,.15)}
.sf-badge--img{padding:0 12px}
.sf-badge--img img{display:block;height:24px;width:auto;filter:grayscale(1);opacity:.9}
.sf-badge--img:hover img{filter:none;opacity:1}
/* every directory icon stays grey, also on hover, so none stands out */
.sf-ico{display:block;width:18px;height:18px;border-radius:5px;background:#fff;padding:2px;filter:grayscale(1);opacity:.7}
@keyframes sf-drift{to{transform:translateX(-50%)}}
.sf-bottom{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;border-top:1px solid var(--c-line);padding:18px 0 26px;font:500 12px 'Rw Mono',monospace;color:var(--c-faint)}
@media (max-width:1023px){.sf-cols{grid-template-columns:repeat(4,1fr)}.sf-about{grid-column:1/-1}}
@media (max-width:760px){
  .sf-wrap{padding:0 16px}
  .sf-cols{grid-template-columns:1fr 1fr;gap:12px 16px;padding:32px 0 20px}
  .sf li a{display:flex;align-items:center;min-height:40px;padding:0}
  .sf-bottom{flex-direction:column;gap:6px}
}

/* one row: logo, four pages, then Terms, Privacy, X, Telegram on the right */
.sf-row{display:flex;align-items:center;gap:28px;padding:28px 0 22px;flex-wrap:wrap}
.sf-links{display:flex;gap:22px;flex-wrap:wrap}
.sf-links a{color:var(--c-dim);font-size:14px}
.sf-links a:hover{color:var(--c-text)}
.sf-links--right{margin-left:auto}
@media (max-width:760px){
  .sf-row{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px;padding:24px 0 14px}
  .sf-row .sh-logo{grid-column:1/-1;margin-bottom:10px}
  .sf-links{flex-direction:column;gap:0}
  .sf-links--right{margin-left:0}
  .sf-links a{display:flex;align-items:center;min-height:40px}
}

@media (pointer:coarse){.sf-links a{display:inline-flex;align-items:center;min-height:40px}}

/* icons beside the phone menu and footer links */
.ico{width:18px;height:18px;flex:none;margin-right:12px;color:var(--c-dim);transition:color .2s,transform .2s}
.ico-w{display:contents}
.sh-panel a:hover .ico,.sh-panel a[aria-current] .ico{color:var(--c-amber)}
.sf-links a{display:inline-flex;align-items:center;transition:color .2s}
.sf-links .ico{width:16px;height:16px;margin-right:8px}
.sf-links a:hover .ico{color:var(--c-amber);transform:translateY(-2px)}
/* the phone menu slides down and its links come in one after another */
@keyframes sh-drop{from{opacity:0;transform:translateX(-24px)}to{opacity:1;transform:none}}
@keyframes sh-in{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}
.sh-menu[open] .sh-panel{animation:sh-drop .22s ease-out}
.sh-menu[open] .sh-panel a{animation:sh-in .32s ease-out both}
.sh-menu[open] .sh-panel a:nth-child(2){animation-delay:.04s}
.sh-menu[open] .sh-panel a:nth-child(3){animation-delay:.08s}
.sh-menu[open] .sh-panel a:nth-child(4){animation-delay:.12s}
.sh-menu[open] .sh-panel a:nth-child(5){animation-delay:.16s}
@media (prefers-reduced-motion:reduce){.sh-menu[open] .sh-panel,.sh-menu[open] .sh-panel a{animation:none}.ico{transition:none}}

/* an open menu or account sheet sits above the terminal's floating agent buttons */
.sh:has(.sh-menu[open]),.sh:has(.account-menu){z-index:1000}

/* signed in on a server page: their own button instead of "Start a free bot" */
.sh-me{display:inline-flex;align-items:center;gap:9px;height:40px;padding:0 14px 0 5px;border:1px solid var(--c-line);border-radius:999px;color:var(--c-text);font:600 14px 'Rw Archivo',system-ui,sans-serif}
.sh-me:hover{border-color:#5a554c}
.sh-av{width:30px;height:30px;border-radius:50%;background:#3a2d16;color:#f4dcae;display:grid;place-items:center;font:700 13px 'Rw Archivo',system-ui,sans-serif;overflow:hidden}
.sh-av img{width:100%;height:100%;object-fit:cover}
.sh-panel .sh-me-wide{margin-top:12px;justify-content:center;height:46px;border-bottom:1px solid var(--c-line)}
.sh-right .sh-me{padding:0;border:0;height:auto}.sh-right .sh-me b{display:none}.sh-right .sh-av{width:36px;height:36px}

/* tablets: the legal links take their own line under the page links instead of wrapping off to the right */
@media (min-width:761px) and (max-width:1023px){.sf-links--right{margin-left:0;flex-basis:100%}}
/* the signed-in avatar on server pages looks like the one on the app pages */
.sh-right .sh-av{width:32px;height:32px;box-shadow:0 0 0 2px #5a4520}

/* the terminal's light theme: the header and its menus turn light too */
[data-theme='light'] .sh{--c-ink:#fbfaf6;--c-line:#d5d0c3;--c-text:#171614;--c-dim:#6b665c;--c-faint:#8f8a80;background:#fbfaf6}
[data-theme='light'] .sh-logo .sh-mark rect{fill:#171614}
[data-theme='light'] .sh-logo .sh-mark path[stroke='#0d0d0c']{stroke:#fbfaf6}
[data-theme='light'] .sh-panel a{border-bottom-color:#e6e1d6}
[data-theme='light'] .sh-menu summary i{background:#171614}
[data-theme='light'] .sf{--c-ink:#f3f0e8;--c-line:#d5d0c3;--c-text:#171614;--c-dim:#6b665c;--c-faint:#8f8a80;background:#f3f0e8}
[data-theme='light'] .sf .sh-mark rect{fill:#171614}[data-theme='light'] .sf .sh-mark path[stroke='#0d0d0c']{stroke:#f3f0e8}

/* phone menu: Terms, Privacy, X and Telegram in one row */
@media (max-width:760px){.sh-legal{flex-wrap:nowrap;justify-content:space-between;gap:4px}.sh-legal a{font-size:12.5px;padding-right:0}.sh-legal .ico{margin-right:4px;width:14px;height:14px}}
