/* Translocate developer site. Shared by the console and the docs. */
:root {
  --bg: #08090a;
  --panel: #101214;
  --raised: #171a1d;
  --fg: #f3f1ea;
  --dim: #aaa69d;
  --faint: #7d7a72;
  --line: rgba(243, 241, 234, .11);
  --line-strong: rgba(243, 241, 234, .22);
  --mint: #33e9b5;
  --mint-soft: #7bf3d0;
  --mint-wash: rgba(51, 233, 181, .09);
  --ink: #052018;
  --red: #ff7a70;
  --red-wash: rgba(255, 122, 112, .09);
  --amber: #f4bd5c;
  --amber-wash: rgba(244, 189, 92, .09);
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: 32px;
  --bar: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--mint); color: var(--ink); }
html { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 16px); }
body { background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 16px; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; overflow-wrap: anywhere; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: var(--mint-soft); text-underline-offset: 3px; }
a:hover { color: var(--mint); }
code, kbd, pre { font-family: var(--mono); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; font-weight: 650; }
button, input, textarea { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--mint); color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; color: var(--ink); }

/* Top bar */
.top { position: sticky; top: 0; z-index: 40; background: rgba(8, 9, 10, .9); border-bottom: 1px solid var(--line); }
.top-in { height: var(--bar); max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.mark { display: inline-flex; align-items: center; gap: 9px; color: var(--fg); text-decoration: none; font-weight: 750; font-size: 18px; letter-spacing: -.03em; white-space: nowrap; }
.mark:hover { color: var(--fg); }
.mark img { width: 26px; height: 26px; object-fit: contain; }
.mark span { color: var(--dim); font-weight: 450; }
.top nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.top nav a { color: var(--dim); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--fg); }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 14px; min-width: 0; }
.who { color: var(--dim); font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 200px; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; color: var(--fg); font-size: 15px; font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--raised); color: var(--fg); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.btn.primary:hover { background: var(--mint-soft); border-color: var(--mint-soft); color: var(--ink); }
.btn.danger { border-color: rgba(255, 122, 112, .55); color: var(--red); }
.btn.danger:hover { background: var(--red-wash); color: var(--red); }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #2a0705; }
.btn.danger-solid:hover { background: #ff958c; border-color: #ff958c; color: #2a0705; }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: 14px; border-radius: 8px; }

.field { display: block; margin-bottom: 16px; }
.field > span, .label { display: block; font-size: 14px; font-weight: 550; margin-bottom: 6px; }
.field small, .help { display: block; color: var(--dim); font-size: 14px; }
.field small { margin-top: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--mint); outline-offset: 0; border-color: transparent; border-radius: 10px; }
input[readonly] { font-family: var(--mono); font-size: 14px; color: var(--mint-soft); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.status { color: var(--mint-soft); font-size: 14px; min-height: 1px; }
.error { color: var(--red); font-size: 14px; }
.note { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 15px; }
.note.warn { border-color: rgba(244, 189, 92, .4); background: var(--amber-wash); }
.note.bad { border-color: rgba(255, 122, 112, .45); background: var(--red-wash); }
.note a { color: inherit; }
.gap { margin-top: 14px; }
.verify { margin-bottom: 22px; }

.badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--dim); font-size: 13px; line-height: 1.5; white-space: nowrap; }
.badge.mint { border-color: rgba(51, 233, 181, .45); color: var(--mint-soft); }
.badge.bad { border-color: rgba(255, 122, 112, .6); color: var(--red); background: var(--red-wash); }

/* Sign in */
.login { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 72px var(--gutter); display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 72px; align-items: center; }
.login h1 { font-size: 34px; letter-spacing: -.03em; margin-bottom: 8px; }
.login .lede { color: var(--dim); margin-bottom: 28px; }
.login form .btn { width: 100%; }
.login .error { margin-bottom: 12px; }
.login-foot { margin-top: 22px; font-size: 15px; color: var(--dim); }
.link-btn { background: none; border: 0; color: var(--mint-soft); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }

/* The gateway trace: what a bot actually sees, played once on load. */
.trace { font-family: var(--mono); font-size: 13.5px; line-height: 1.5; border-left: 1px solid var(--line-strong); padding-left: 24px; }
.trace li { display: grid; grid-template-columns: 26px minmax(0, 1fr); padding: 7px 0; opacity: 0; animation: line-in .3s ease-out forwards; }
.trace li:nth-child(1) { animation-delay: .15s; }
.trace li:nth-child(2) { animation-delay: .5s; }
.trace li:nth-child(3) { animation-delay: .95s; }
.trace li:nth-child(4) { animation-delay: 1.35s; }
.trace li:nth-child(5) { animation-delay: 1.75s; }
.trace li:nth-child(6) { animation-delay: 2.15s; }
.trace .dir { color: var(--faint); }
.trace .in .dir, .trace .in b { color: var(--mint); }
.trace b { font-weight: 500; }
.trace p { color: var(--dim); }
@keyframes line-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* Console */
.page { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 36px var(--gutter) 72px; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.head h1 { font-size: 30px; letter-spacing: -.03em; }
.head h1:focus { outline: none; }
.lede-sm { color: var(--dim); max-width: 62ch; }

.app-list { border-top: 1px solid var(--line); }
.app-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 10px; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.app-row:hover { background: var(--panel); color: var(--fg); }
.app-row h2 { font-size: 17px; letter-spacing: -.01em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.app-row p { color: var(--dim); font-size: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.app-row .count { color: var(--dim); font-size: 14px; white-space: nowrap; }

.icon { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--mint-wash); border: 1px solid rgba(51, 233, 181, .3); color: var(--mint-soft); display: grid; place-items: center; font-weight: 650; font-size: 18px; overflow: hidden; }
.icon.big { width: 72px; height: 72px; border-radius: 18px; font-size: 28px; }

.empty { padding: 40px 0; max-width: 56ch; }
.empty h2 { font-size: 20px; margin-bottom: 6px; }
.empty p { color: var(--dim); margin-bottom: 16px; }
.narrow { max-width: 560px; }

.back { display: inline-block; font-size: 15px; color: var(--dim); text-decoration: none; margin-bottom: 14px; }
.title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.meta { color: var(--dim); font-size: 14px; }
.meta code { font-size: 13px; }
.detail-head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: 20px; }
.detail-head h1 { font-size: 30px; letter-spacing: -.03em; }
.detail-head h1:focus { outline: none; }

.detail { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 48px; align-items: start; }
.jump { position: sticky; top: calc(var(--bar) + 24px); font-size: 15px; }
.jump a { display: block; padding: 6px 0; color: var(--dim); text-decoration: none; }
.jump a:hover { color: var(--fg); }
.sections { min-width: 0; max-width: 820px; }
.section { padding: 26px 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; padding-top: 0; }
.section > h2 { font-size: 20px; margin-bottom: 6px; }
.section > .help { margin-bottom: 16px; max-width: 64ch; }
.section h3 { font-size: 16px; margin: 22px 0 8px; letter-spacing: -.01em; }
.section.danger-zone > h2 { color: var(--red); }

.icon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.file-input { display: block; max-width: 100%; font-size: 14px; color: var(--dim); }
.file-input::file-selector-button { font: inherit; color: var(--fg); background: transparent; border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 12px; margin-right: 10px; cursor: pointer; }

.switch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; margin-top: 1px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line-strong); position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--dim); transition: transform .15s, background .15s; }
.switch input:checked { background: var(--mint); border-color: var(--mint); }
.switch input:checked::after { transform: translateX(18px); background: var(--ink); }
.switch input:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 999px; }
.switch b { display: block; font-weight: 550; }
.switch small { display: block; color: var(--dim); font-size: 14px; }

/* Token reveal */
.token-panel { border: 1px solid rgba(244, 189, 92, .55); background: var(--amber-wash); border-radius: 14px; padding: 18px 20px; margin-bottom: 26px; }
.token-panel h2 { font-size: 18px; margin-bottom: 4px; }
.token-panel h2:focus { outline: none; }
.token-panel p { font-size: 15px; margin-bottom: 12px; }
.token-panel strong { color: var(--amber); font-weight: 600; }
.copy-line { display: flex; gap: 10px; align-items: stretch; }
.copy-line input { flex: 1; min-width: 0; }
.token-panel .actions { margin-top: 12px; }

/* Permission picker */
.picker { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.picker-search { padding: 10px; border-bottom: 1px solid var(--line); background: var(--panel); }
.perm-list { max-height: 340px; overflow-y: auto; }
.perm { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.perm:last-child { border-bottom: 0; }
.perm:hover { background: var(--panel); }
.perm input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--mint); }
.perm b { font-weight: 550; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.perm small { display: block; color: var(--dim); font-size: 13.5px; }
.perm.dangerous { background: var(--red-wash); }
.perm.dangerous input { accent-color: var(--red); }
.perm.dangerous b { color: var(--red); }
.picker-empty { padding: 14px 12px; color: var(--dim); font-size: 14px; }
.picker-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0; font-size: 14px; color: var(--dim); }
.picker-foot code { color: var(--fg); }

/* Commands */
.cmd { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cmd:last-child { border-bottom: 0; }
.cmd code.name { color: var(--mint-soft); font-size: 15px; }
.cmd p { color: var(--dim); font-size: 14px; }
.opts { margin-top: 6px; font-size: 14px; }
.opts li { padding: 2px 0 2px 12px; border-left: 1px solid var(--line-strong); }
.opts code { font-size: 13px; }
.opts .type { color: var(--dim); }
.opts small { color: var(--dim); }

/* Dialog */
dialog { margin: auto; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; color: var(--fg); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px; }
dialog::backdrop { background: rgba(0, 0, 0, .7); }
dialog h2 { font-size: 20px; margin-bottom: 8px; }
dialog p { color: var(--dim); font-size: 15px; margin-bottom: 14px; }
dialog p.error { color: var(--red); }
dialog .actions { justify-content: flex-end; margin-top: 6px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line-strong); font-size: 15px; }

footer.site { border-top: 1px solid var(--line); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 20px var(--gutter); display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--faint); font-size: 14px; }
.foot-in a { color: var(--dim); }

/* Docs */
.docs { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; }
.toc { position: sticky; top: var(--bar); align-self: start; max-height: calc(100vh - var(--bar)); overflow-y: auto; padding: 28px 4px 28px 0; font-size: 15px; }
.toc summary { display: none; }
.toc ul ul { margin: 2px 0 8px 12px; border-left: 1px solid var(--line); padding-left: 10px; font-size: 14px; }
.toc a { display: block; padding: 4px 0; color: var(--dim); text-decoration: none; }
.toc a:hover { color: var(--fg); }
.toc a.here { color: var(--mint); }

.prose { min-width: 0; max-width: 780px; padding: 36px 0 80px; }
.prose h1 { font-size: 38px; letter-spacing: -.035em; margin-bottom: 12px; }
.prose > .lede { color: var(--dim); font-size: 18px; margin-bottom: 8px; }
.prose h2 { font-size: 26px; letter-spacing: -.025em; margin: 56px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 19px; margin: 32px 0 8px; }
.prose h4 { font-size: 16px; letter-spacing: -.01em; margin: 26px 0 6px; font-weight: 600; }
.prose p { margin: 0 0 12px; max-width: 72ch; }
.prose ul, .prose ol { margin: 0 0 14px 22px; max-width: 72ch; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 5px; }
.prose li::marker { color: var(--faint); }
.prose :not(pre) > code { font-size: .88em; padding: 1px 5px; border-radius: 5px; background: var(--raised); color: var(--mint-soft); overflow-wrap: anywhere; }
.prose .note { margin: 14px 0; max-width: 72ch; }
.prose .note p:last-child { margin-bottom: 0; }

.code { position: relative; margin: 10px 0 16px; }
.code pre { overflow-x: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 13.5px; line-height: 1.6; tab-size: 2; overflow-wrap: normal; }
.code code { white-space: pre; }
.code .copy { position: absolute; top: 7px; right: 7px; min-height: 28px; padding: 2px 10px; font-size: 13px; background: var(--raised); opacity: 0; }
.code:hover .copy, .code .copy:focus-visible, .code .copy.done { opacity: 1; }
@media (hover: none) { .code .copy { opacity: 1; } }

.table-wrap { overflow-x: auto; margin: 10px 0 18px; border: 1px solid var(--line); border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); overflow-wrap: normal; }
.prose th { font-weight: 600; background: var(--panel); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td code { white-space: nowrap; }
.prose td.wrap code { white-space: normal; }

.route { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 28px 0 6px; font-family: var(--mono); font-size: 15px; letter-spacing: 0; font-weight: 500; }
.route code { padding: 0 !important; background: none !important; color: var(--fg) !important; font-size: 15px !important; }
.verb { font-size: 12.5px; font-weight: 600; padding: 1px 7px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--dim); }
.verb.get { color: var(--mint-soft); border-color: rgba(123, 243, 208, .4); }
.verb.post, .verb.put, .verb.patch { color: var(--amber); border-color: rgba(244, 189, 92, .4); }
.verb.delete { color: var(--red); border-color: rgba(255, 122, 112, .45); }

@media (max-width: 960px) {
  .detail { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .jump { display: none; }
  .login { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 40px; padding-bottom: 40px; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; max-height: none; padding: 12px 0 0; }
  .toc summary { display: block; cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 550; }
  .toc[open] summary { margin-bottom: 8px; }
  .prose { padding-top: 22px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --bar: 58px; }
  .top-in { gap: 12px; }
  .top nav { gap: 12px; font-size: 14px; }
  .mark span, .who { display: none; }
  .btn.small { padding: 4px 10px; }
  .page { padding-top: 22px; }
  .head h1, .detail-head h1 { font-size: 25px; }
  .prose h1 { font-size: 31px; }
  .prose h2 { font-size: 23px; margin-top: 44px; }
  .app-row { grid-template-columns: 44px minmax(0, 1fr); }
  .app-row .count { grid-column: 2; }
  .detail-head { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
  .detail-head .icon.big { width: 56px; height: 56px; border-radius: 14px; font-size: 22px; }
  .copy-line { flex-direction: column; }
  .token-panel { padding: 14px; }
  .trace { font-size: 12.5px; padding-left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .trace li { animation: none; opacity: 1; }
}
