/* Tunnet docs: the same visual system as the home page (its :root tokens, system fonts, near-black, gold used
   sparingly). One stylesheet for every docs page. No outside resources. */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gut: clamp(16px, 5vw, 76px);
  color-scheme: dark;
  --bg: #0b0b0d; --well: #141417; --line: #26262c;
  --text: #ececf0; --t2: #b3b3bd; --t3: #8a8a95;
  --gold: #f0b13a; --hot: #ffd88a; --gold-ink: #f0b13a; --gold-rgb: 240, 177, 58;
  --pri-bg: #f0b13a; --pri-fg: #18181b; --pri-hover: #f6c35e;
  --gh-bg: rgba(20, 20, 23, .55); --gh-line: rgba(236, 236, 240, .22); --gh-line-h: rgba(236, 236, 240, .45);
  --lift: 0 24px 56px -16px rgba(0, 0, 0, .85);
  --focus: #f0b13a;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; font-size: 17px; line-height: 1.6; background: var(--bg); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
h1, h2 { font-weight: 700; letter-spacing: -0.028em; margin: 0; text-wrap: balance; }
img { max-width: 100%; height: auto; }

/* the top bar: the brand, the word Docs, and the way to the pilot */
.top { display: flex; align-items: center; gap: 18px; height: 64px; padding: 0 var(--gut); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; color: var(--text); }
.brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .18), 0 0 14px rgba(var(--gold-rgb), .6); }
.top .docs { color: var(--t2); font-size: 15px; font-weight: 500; padding-left: 18px; border-left: 1px solid var(--line); line-height: 1; }
.top .docs:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: 11px; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap; transition: background-color .2s, color .2s; }
.btn.pri { background: var(--pri-bg); color: var(--pri-fg); margin-left: auto; }
.btn.pri:hover { background: var(--pri-hover); }

/* the page: a sidebar and the content */
.wrap { max-width: 1240px; margin: 0 auto; padding: 48px var(--gut) 72px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 64px; align-items: start; }
.side { position: sticky; top: 28px; display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; }
.side a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--t2); font-size: 15px; font-weight: 500; line-height: 1.3; }
.side a:hover { color: var(--text); background: var(--well); }
.side a[aria-current="page"] { color: var(--text); background: var(--well); box-shadow: inset 2px 0 0 var(--gold); }
.content { max-width: 900px; min-width: 0; }

/* type */
h1 { font-size: clamp(32px, 3.6vw, 46px); line-height: 1.06; max-width: 20ch; }
h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.12; max-width: 24ch; margin-top: 64px; }
h3 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -0.014em; font-weight: 600; color: var(--text); text-wrap: pretty; }
p { margin: 14px 0 0; max-width: 60ch; color: var(--t2); text-wrap: pretty; }
h1 + p, h2 + p { margin-top: 20px; }
.lede { font-size: 19px; line-height: 1.55; max-width: 36em; }
.content a:not(.btn) { color: var(--text); text-decoration: underline; text-decoration-color: rgba(var(--gold-rgb), .55); text-underline-offset: 3px; }
.content a:not(.btn):hover { text-decoration-color: var(--gold); }
code { font-family: var(--mono); font-size: 0.9em; color: var(--text); }
p code, summary code { padding: 1px 5px; border-radius: 5px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }

/* a window frame around a screenshot */
.win { margin: 32px 0 0; border-radius: 12px; border: 1px solid var(--line); background: var(--well); overflow: hidden; box-shadow: 0 32px 90px -34px rgba(0, 0, 0, .9); }
.win .chrome { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.win .chrome i { width: 10px; height: 10px; border-radius: 50%; background: #2b2b33; }
.win img { display: block; width: 100%; height: auto; }

/* three steps, one row each; a real sequence, so it counts */
.steps { list-style: none; counter-reset: step; margin: 32px 0 0; padding: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto 1fr; gap: 0 40px; align-items: start; border-top: 1px solid var(--line); padding: 24px 0 32px; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps h3::before { content: counter(step); display: inline-block; min-width: 1.4em; color: var(--gold); font-variant-numeric: tabular-nums; }
.steps p { grid-column: 1; margin-top: 10px; font-size: 16.5px; max-width: 58ch; }
.cmd { margin: 0; padding: 13px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--well); overflow-x: auto; font-family: var(--mono); font-size: 14px; line-height: 1.75; color: var(--text); }
.cmd code { font-size: inherit; }
.steps .cmd { grid-column: 2; grid-row: 1 / span 2; width: 100%; min-width: 0; margin-top: 2px; }

/* onward links at the end of Get started */
.onward { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 0; }
.onward li { border-top: 1px solid var(--line); padding: 16px 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.onward li:last-child { border-bottom: 1px solid var(--line); }
.onward a { font-weight: 600; }
.onward span { color: var(--t2); font-size: 16px; }

/* the handoff, as a transcript: speaker, then the line, wrapping under the line's own column */
.talk { margin: 28px 0 0; padding: 22px 26px 26px; border-radius: 12px; border: 1px solid var(--line); background: var(--well); font-family: var(--mono); font-size: 14px; line-height: 1.65; overflow-x: auto; }
.talk .ln { display: grid; grid-template-columns: 7ch minmax(0, 1fr); gap: 0 14px; margin: 0; padding: 4px 0; max-width: none; font-size: inherit; line-height: inherit; color: var(--t2); }
.talk .who { color: var(--t3); }
.talk .you { color: var(--text); }
.talk .tn, .talk .tn .who { color: var(--gold); }
.talk .aside { color: var(--t3); font-style: italic; padding: 10px 0; }
.talk .aside > span { grid-column: 2; }

/* the four facts on the security page */
.facts { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 48px; }
.facts li { border-top: 1px solid var(--line); padding-top: 18px; }
.facts h2 { font-size: 20px; line-height: 1.3; letter-spacing: -0.014em; font-weight: 600; margin: 0; max-width: none; }
.facts p { margin-top: 10px; font-size: 16.5px; max-width: 58ch; }

/* the questions */
.qs { margin: 36px 0 0; max-width: 760px; border-top: 1px solid var(--line); }
.qs details { border-bottom: 1px solid var(--line); }
.qs summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 14px; align-items: center; gap: 20px; padding: 18px 2px; border-radius: 8px; font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--text); }
.qs summary::-webkit-details-marker { display: none; }
.qs summary > span { min-width: 0; }
.qs summary::after { content: ""; width: 14px; height: 14px; background:
    linear-gradient(var(--t3), var(--t3)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--t3), var(--t3)) center / 1.5px 14px no-repeat; }
.qs details[open] summary::after { background-size: 14px 1.5px, 0 0; }
.qs summary:hover { color: var(--hot); }
.qs details p { margin: 0 0 20px; max-width: 42em; }

/* previous and next */
.pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); }
.content .pn a { display: block; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); font-weight: 600; text-decoration: none; }
.pn a small { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; color: var(--t3); }
.pn a:hover { border-color: var(--gh-line-h); }
.pn .next { text-align: right; grid-column: 2; }

footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; padding: 30px var(--gut) 40px; border-top: 1px solid var(--line); color: var(--t3); font-size: 14.5px; }
footer .brand { font-size: 15px; margin-right: auto; }
footer .brand i { width: 7px; height: 7px; }

@media (prefers-reduced-motion: no-preference) {
  .qs summary { transition: color .15s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (max-width: 960px) {
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 4px; padding: 12px 0; margin: 0 0 32px; border-bottom: 1px solid var(--line); }
  .side a { padding: 7px 9px; font-size: 14.5px; }
  .steps li { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; padding: 22px 0 28px; }
  .steps .cmd { grid-column: 1; grid-row: auto; margin-top: 18px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .top { height: 58px; gap: 14px; }
  .top .docs { padding-left: 14px; }
  .btn { height: 36px; padding: 0 14px; font-size: 14px; }
  h2 { margin-top: 48px; }
  .win { margin-top: 24px; border-radius: 10px; }
  .win .chrome { height: 28px; padding: 0 12px; }
  .win .chrome i { width: 8px; height: 8px; }
  .talk { padding: 16px 16px 18px; font-size: 13px; line-height: 1.6; }
  .talk .ln { grid-template-columns: 6.5ch minmax(0, 1fr); gap: 0 10px; }
  .cmd { font-size: 13px; padding: 12px 14px; }
  .onward li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .qs summary { font-size: 17px; padding: 16px 2px; }
  .pn { grid-template-columns: minmax(0, 1fr); }
  .pn .next { grid-column: 1; text-align: left; }
  footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .cmd { font-size: 12px; padding: 11px 13px; }
}
