/* Shared TOKENLOCK header and footer chrome. Marketing pages already get these
   rules via css/tokenlock-site.css. Docs, demos, dashboard, admin and the vault
   load this file after css/site.css and css/pages.css so the home-page header
   looks the same without restyling the rest of those pages. */
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

header.site,
footer.site.tl-foot {
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --orange: #F7931A;
  --orange-hover: #e58610;
  --ink: #f5f5f7;
  --muted: #8e8e93;
  --faint: #636366;
  --line: rgba(255,255,255,0.1);
  --bg: #07080b;
  --btn-ghost-border: rgba(255,255,255,0.22);
  --btn-ghost-hover: rgba(255,255,255,0.06);
}

header.site {
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
header.site .wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
header.site .logo { display: flex; align-items: center; flex: 0 0 auto; }
header.site .logo img { height: 22px; width: auto; display: block; max-width: none; }
header.site .links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: 8px;
}
header.site .links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
}
header.site .links a:hover { color: var(--ink); }
header.site .links a[aria-current="page"] { color: var(--ink); }
header.site .actions {
  margin-left: auto;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
header.site .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Cancel the 56px height and hover scale from css/site.css .btn, which loads
     first on docs, demo, dashboard, admin and vault pages. min-height alone
     left these header buttons 56px tall against the 40px home header. */
  height: auto;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  box-sizing: border-box;
  transform: none;
  transition: none;
}
header.site .btn:hover { transform: none; }
header.site .btn-primary { background: var(--orange); color: #000; }
header.site .btn-primary:hover { background: var(--orange-hover); color: #000; transform: none; }
header.site .btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--btn-ghost-border);
}
header.site .btn-outline:hover { background: var(--btn-ghost-hover); color: var(--ink); transform: none; }
header.site .signin .short { display: none; }

footer.site.tl-foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
  color: var(--faint);
  font-size: 12.5px;
  margin-top: 72px;
  background: var(--bg);
}
footer.site.tl-foot .wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: space-between;
  align-items: center;
}
footer.site.tl-foot .foot-brand { display: flex; align-items: center; flex: 0 0 auto; }
footer.site.tl-foot .foot-brand img { height: 18px; width: auto; display: block; }
footer.site.tl-foot .foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; }
footer.site.tl-foot .foot-links a { color: var(--muted); font-weight: 600; text-decoration: none; }
footer.site.tl-foot .foot-links a:hover { color: var(--ink); }
footer.site.tl-foot .foot-copy { color: var(--faint); font-size: 12px; letter-spacing: -0.01em; white-space: nowrap; margin: 0; }

@media (max-width: 860px) {
  header.site .links { display: flex; margin-left: 0; }
  header.site .links a:not(.why) { display: none; }
  header.site .links a.why { color: var(--ink); }
}
@media (max-width: 500px) {
  header.site .wrap { gap: 8px; width: calc(100% - 24px); }
  header.site .logo img { height: 15px; }
  header.site .actions { gap: 6px; }
  header.site .btn { height: auto; min-height: 34px; padding: 0 10px; font-size: 12.5px; }
  header.site .links a.why { font-size: 12px; }
}
@media (max-width: 350px) {
  header.site .wrap { gap: 6px; width: calc(100% - 16px); }
  header.site .logo img { height: 12px; }
  header.site .actions { gap: 4px; }
  header.site .btn { height: auto; min-height: 32px; padding: 0 8px; font-size: 12px; }
  header.site .links a.why { font-size: 11.5px; letter-spacing: -0.02em; }
}


/* Site polish (Nov 24 2026): mobile menu on chrome pages. */
header.site .nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid var(--btn-ghost-border);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
  font-family: inherit;
}
header.site .nav-toggle:hover { background: var(--btn-ghost-hover); }
header.site .nav-toggle-bars,
header.site .nav-toggle-bars::before,
header.site .nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}
header.site .nav-toggle-bars::before,
header.site .nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
header.site .nav-toggle-bars::before { top: -5px; }
header.site .nav-toggle-bars::after { top: 5px; }

@media (max-width: 1080px) {
  header.site .nav-toggle { display: inline-flex; }
  header.site .links { display: none; }
}
@media (max-width: 500px) {
  header.site .nav-toggle { width: 34px; min-width: 34px; height: 34px; min-height: 34px; }
}

.site-menu {
  background: var(--bg, #07080b);
  color: var(--ink, #f5f5f7);
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border: 1px solid var(--line, rgba(255,255,255,0.1));
  width: min(100%, 400px);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  padding: 20px 20px 40px;
  box-sizing: border-box;
}
.site-menu::backdrop { background: rgba(0, 0, 0, 0.64); }
.site-menu-close {
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted, #8e8e93);
  background: transparent;
  border: 0;
  padding: 8px 0 16px;
  cursor: pointer;
}
.site-menu-close:hover { color: var(--ink, #f5f5f7); }
.site-menu-nav { display: flex; flex-direction: column; gap: 4px; }
.site-menu-nav a {
  color: var(--muted, #8e8e93);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 10px 0;
}
.site-menu-nav a:hover,
.site-menu-nav a[aria-current="page"] { color: var(--ink, #f5f5f7); }
.site-menu-nav a.btn {
  margin-top: 8px;
  padding: 0 16px;
  text-align: center;
  box-sizing: border-box;
}
.site-menu-nav a.btn-primary { color: #000; }
.site-menu-nav a.btn-outline { color: var(--ink, #f5f5f7); }


/* Docs typography (TOK-23): marketing pages use Instrument Sans and a
   min(1180px, calc(100% - 48px)) wrap, left-aligned with the header. Docs
   pages used to ship a narrower centered 860px column and inherit Montserrat
   plus 56px headings from per-page inline rules and css/site.css. These
   rules are scoped to main.doc so dashboard, demos and the vault are unchanged.
   Specificity (main.doc) beats the inline .doc typography. */
main.doc {
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 80px;
  text-align: left;
  line-height: 1.55;
  color: var(--ink, #f5f5f7);
}
main.doc h1 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 0 0 14px;
  text-align: left;
  max-width: 22ch;
}
main.doc h1 em { font-style: normal; color: var(--orange, #F7931A); }
main.doc .lede {
  color: var(--muted, #8e8e93);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  margin: 0 0 32px;
  max-width: 58ch;
  text-align: left;
}
main.doc h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 28px 0 10px;
  text-align: left;
}
main.doc h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 22px 0 8px;
  text-align: left;
}
main.doc p,
main.doc li {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted, #8e8e93);
  text-align: left;
}
main.doc p { margin: 0 0 12px; }
main.doc ul,
main.doc ol { margin: 0 0 16px; padding-left: 18px; }
main.doc li { margin: 0 0 8px; }
main.doc a { color: var(--orange, #F7931A); }
main.doc a:hover { color: var(--orange-hover, #e58610); text-decoration: underline; }
main.doc pre {
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
main.doc :not(pre) > code { overflow-wrap: anywhere; word-break: break-word; }
main.doc .doc-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
main.doc table.t,
main.doc table {
  width: 100%;
  max-width: 100%;
  text-align: left;
}
main.doc th,
main.doc td {
  overflow-wrap: anywhere;
  word-break: break-word;
}
main.doc .doc-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
main.doc .doc-toc a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #8e8e93);
  text-decoration: none;
}
main.doc .doc-toc a:hover { color: var(--orange, #F7931A); }
main.doc .doc-setup {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: start;
  margin: 0 0 32px;
}
main.doc .doc-explainers {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
main.doc .explainer {
  border: 1px solid var(--line, rgba(255,255,255,0.1));
  border-radius: 12px;
  padding: 16px 18px;
}
main.doc .explainer h2,
main.doc .explainer h3 { margin-top: 0; }
main.doc .explainer p:last-child { margin-bottom: 0; }
main.doc .doc-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 36px;
}
main.doc .result-card {
  border: 1px solid var(--line, rgba(255,255,255,0.1));
  border-radius: 12px;
  padding: 14px 16px;
  background: #111;
}
main.doc .result-card .req {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--ink, #f5f5f7);
  margin: 0 0 8px;
}
main.doc .result-card .outcome {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink, #f5f5f7);
}
main.doc .result-card .code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--ink, #f5f5f7);
}
main.doc .result-card .why {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted, #8e8e93);
  margin: 6px 0 0;
}
main.doc .result-card[data-result="allowed"] .outcome { color: #f5f5f7; }
main.doc .result-card[data-result="denied"] .outcome { color: #f5f5f7; }

/* Grid and flex children shrink so long pre/table content scrolls inside the box. */
main.doc section,
main.doc aside,
main.doc .doc-setup,
main.doc .doc-setup > *,
main.doc .doc-results,
main.doc .doc-results > *,
main.doc .doc-explainers,
main.doc .doc-explainers > *,
main.doc .doc-toc,
main.doc .ep,
main.doc .pill-row,
main.doc .tl-x,
main.doc .tl-x-wrap,
main.doc .tl-x .card-row,
main.doc .tl-x .dcard {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
main.doc .ep .p {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

@media (max-width: 860px) {
  main.doc .tl-x .card-row.two,
  main.doc .tl-x .card-row.three { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  main.doc { width: min(1180px, calc(100% - 32px)); padding: 36px 0 64px; }
  main.doc .doc-setup,
  main.doc .doc-results { grid-template-columns: minmax(0, 1fr); }
}

/* Keep in sync with the same shared page-hero block in css/tokenlock-site.css (marketing pages do not load this file). */

/* Shared page-hero typography (24 Nov 2026).
   One scale for every public page title, matching /security and /developers:
   Instrument Sans, clamp(32px, 4vw, 44px) / 700 / line-height 1.1, left-aligned
   on the min(1180px, calc(100% - 48px)) wrap, 56px padding under the 64px
   header, lede 18px #8e8e93. The home v4 hero (.hero h1) is the designed
   large centered headline and is intentionally excluded. Docs pill-rows
   (subnav, not eyebrows) stay above the heading, so those h1s sit lower. */
main.doc > h1,
main.doc-main .content > h1,
main.doc-main .page-404 > h1,
.page-intro h1,
.agents-hero-copy > h1,
.wb-copy > h1,
main.stage.ed-stage h1,
main.stage.gd > h1,
main.page-hero-first > section:first-child > .wrap > h2:first-of-type {
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 0 0 14px;
  text-align: left;
  color: var(--ink, #f5f5f7);
  max-width: none;
}

main.doc > .lede,
main.doc-main .content > h1 + .lede,
main.doc-main .page-404 > h1 + .lede,
.page-intro h1 + p:not(.cta),
.agents-hero-copy > h1 + p:not(.cta),
.wb-copy > h1 + p:not(.cta),
main.stage.ed-stage h1 + .one,
main.stage.gd > h1 + .one,
main.page-hero-first > section:first-child > .wrap > h2 + .sub {
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: #8e8e93;
  letter-spacing: normal;
  text-align: left;
  margin: 0 0 32px;
  max-width: 58ch;
}

/* 56px below the 64px header so the h1 top is 120px when there is no pill row. */
main.doc-main { padding-top: 56px; }
.page-intro { padding: 56px 0 0; }
.wb-hero { padding: 56px 0 32px; }
.page-404 { padding-top: 0; }
main.stage.ed-stage,
main.stage.gd {
  width: min(1180px, calc(100% - 48px));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-top: 56px;
  text-align: left;
}
main.page-hero-first > section:first-child { padding-top: 56px; }

@media (max-width: 760px) {
  main.doc-main { padding-top: 36px; }
  .page-intro { padding-top: 36px; }
  .wb-hero { padding-top: 36px; }
  main.stage.ed-stage,
  main.stage.gd { padding-top: 36px; width: min(1180px, calc(100% - 32px)); }
  main.page-hero-first > section:first-child { padding-top: 36px; }
}
