/*
 * turnkeel.com: one stylesheet. The colour tokens are the app's (Turnkeel's
 * docs/DESIGN.md, section 2), in Light and in Dark through prefers-color-scheme.
 * IBM Plex Sans and Mono are files of this site; nothing is fetched from a font host.
 */

/* ---------- Fonts ---------- */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/ibm-plex-sans-latin-ext-400-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/ibm-plex-sans-latin-400-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens (DESIGN.md 2.1) ---------- */

:root {
  color-scheme: light dark;
  --background: #ffffff;
  --foreground: #18181b;
  --foreground-soft: #3f3f46;
  --card: #ffffff;
  --muted: #f4f4f5;
  --muted-foreground: #52525b;
  --selected: #e6f4f1;
  --primary: #0f766e;
  --primary-hover: #115e59;
  --primary-foreground: #ffffff;
  --ring: #0f766e;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --input: #8a8a93;
  --destructive: #b91c1c;
  --state-changes: #92400e;
  --raised-shadow: 0 8px 24px rgb(0 0 0 / 0.12);

  /* The command box is drawn dark in both themes, as a terminal. */
  --cmd-ground: #18181b;
  --cmd-line: #3f3f46;
  --cmd-text: #f4f4f5;
  --cmd-quiet: #a1a1aa;
  --cmd-accent: #14b8a6;
  --cmd-hover: #27272a;

  --radius: 6px;
  --font-ui: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-code: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --page: 1200px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #18181b;
    --foreground: #f4f4f5;
    --foreground-soft: #d4d4d8;
    --card: #1f1f23;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --selected: #12302d;
    --primary: #14b8a6;
    --primary-hover: #2dd4bf;
    --primary-foreground: #042f2e;
    --ring: #14b8a6;
    --border: #303036;
    --border-strong: #3f3f46;
    --input: #85858f;
    --destructive: #f87171;
    --state-changes: #fbbf24;
    --raised-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
    --cmd-ground: #0f0f11;
    --cmd-line: #3f3f46;
    --cmd-hover: #27272a;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 21px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}

a {
  color: var(--primary);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-weight: 600;
  margin: 0;
}

code,
kbd,
pre,
.mono {
  font-family: var(--font-code);
  font-weight: 400;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus {
  top: 8px;
  color: var(--primary-foreground);
}

.quiet {
  color: var(--muted-foreground);
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.section-label {
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* ---------- Header and footer ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--background);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 24px;
  min-height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--foreground);
  text-decoration: none;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  min-height: 44px;
}
.brand:hover {
  color: var(--foreground);
}
.brand svg {
  color: var(--primary);
  flex: none;
}
.header-rule {
  width: 1px;
  height: 20px;
  background: var(--border);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 12px;
  color: var(--foreground-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: var(--foreground);
  border-bottom-color: var(--border-strong);
}
.site-nav a[aria-current='page'] {
  color: var(--primary);
  font-weight: 500;
  border-bottom-color: var(--primary);
}
.github-note {
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-foreground);
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-foreground);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  justify-content: space-between;
}
.site-footer p {
  margin: 8px 0 0;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
}
.footer-nav a {
  color: var(--foreground-soft);
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.footer-nav a:hover {
  color: var(--foreground);
}

/* ---------- Buttons and the command box ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms;
}
.btn:hover {
  background: var(--muted);
  color: var(--foreground);
  text-decoration: none;
}
.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: var(--primary-foreground);
}
.btn[disabled] {
  cursor: not-allowed;
  background: var(--muted);
  border-color: var(--border-strong);
  color: var(--muted-foreground);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 440px;
  min-height: 56px;
  padding: 8px 8px 8px 18px;
  border-radius: var(--radius);
  background: var(--cmd-ground);
  border: 1px solid var(--cmd-line);
  color: var(--cmd-text);
}
.cmd code {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  line-height: 24px;
  white-space: pre;
  overflow-x: auto;
}
.cmd .prompt {
  color: var(--cmd-accent);
  font-family: var(--font-code);
  user-select: none;
}
.cmd-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--cmd-line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--cmd-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.cmd-copy:hover {
  background: var(--cmd-hover);
}
.cmd-copy:focus-visible {
  outline-color: var(--cmd-accent);
}
.cmd-copy[hidden] {
  display: none;
}
.cmd-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-foreground);
}

/* ---------- Home ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px 64px;
  align-items: start;
  padding-top: 64px;
  padding-bottom: 48px;
}
.hero h1 {
  margin: 0 0 16px;
  font-size: 40px;
  line-height: 48px;
}
.hero .lead {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 28px;
  max-width: 620px;
}
.hero .sub {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 24px;
  color: var(--foreground-soft);
  max-width: 620px;
}
.hero .btn-row {
  margin-top: 28px;
}

.who {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.who h2 {
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 8px;
}
.who ul,
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.who li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.who li strong,
.def-list strong {
  display: block;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
}
.who li span,
.def-list span {
  display: block;
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 20px;
}

.band {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.band-muted {
  background: var(--muted);
}
.band h2 {
  font-size: 24px;
  line-height: 32px;
  margin-bottom: 12px;
}
.band .intro {
  margin: 0 0 28px;
  max-width: 680px;
  font-size: 15px;
  line-height: 24px;
  color: var(--foreground-soft);
}
.band h3 {
  font-size: 15px;
  line-height: 22px;
  margin-bottom: 8px;
}

/* The drawn Your turn */

.drawing-section {
  padding-top: 8px;
  padding-bottom: 56px;
}
.drawing-caption {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-foreground);
}
.app {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--background);
  font-size: 14px;
  line-height: 21px;
}
.app-address {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}
.app-address span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--background);
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--muted-foreground);
}
.app-dots {
  display: flex;
  gap: 6px;
  flex: none;
}
.app-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
}
.app-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  white-space: nowrap;
  overflow: hidden;
}
.app-top .logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.app-top .logo svg {
  color: var(--primary);
}
.app-top .rule {
  width: 1px;
  height: 20px;
  background: var(--border);
}
.app-top .ws {
  font-weight: 500;
}
.tag {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--muted);
  color: var(--foreground-soft);
  font-size: 11px;
  line-height: 18px;
  font-weight: 500;
  white-space: nowrap;
}
.app-top .project {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.app-tabs {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
}
.app-tabs > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  color: var(--foreground-soft);
  border-bottom: 2px solid transparent;
}
.app-tabs > .current {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}
.app-tabs > .sep {
  width: 1px;
  min-height: 0;
  height: 20px;
  align-self: center;
  padding: 0;
  background: var(--border);
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
}
.app-body {
  display: grid;
  grid-template-columns: minmax(0, 512px) minmax(0, 1fr);
}
.app-list {
  border-right: 1px solid var(--border);
}
.app-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.app-list-head .h {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}
.app-list-head .s {
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-foreground);
}
.select-look {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-weight: 500;
  white-space: nowrap;
}
.line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.line.selected {
  background: var(--selected);
  border-inline-start: 3px solid var(--primary);
  padding-inline-start: 17px;
}
.kind {
  padding-top: 3px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.selected .kind {
  color: var(--primary);
}
.line .t {
  display: block;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.selected .t {
  font-weight: 600;
}
.line .c {
  display: block;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-foreground);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.selected .c {
  color: var(--foreground-soft);
}
.key {
  font-family: var(--font-code);
  font-size: 13px;
  color: var(--muted-foreground);
  margin-right: 4px;
}
.line .r {
  text-align: right;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.line .r b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  font-size: 13px;
  line-height: 22px;
  color: var(--foreground);
}
.changes {
  color: var(--state-changes) !important;
}
.mark-you {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex: none;
}
.mark-agent {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--foreground);
  flex: none;
}
.agent {
  font-family: var(--font-code);
  font-size: 13px;
}
.mark-person {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--muted-foreground);
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  color: var(--foreground-soft);
  flex: none;
}
.party {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--muted-foreground);
  border-radius: 4px;
  font-size: 12px;
  line-height: 18px;
  color: var(--foreground-soft);
}
.app-more {
  padding: 12px 20px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.app-pane {
  min-width: 0;
}
.host-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 37px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.host-bar .space {
  flex: 1 1 auto;
}
.host-bar .open-in {
  color: var(--primary);
  text-decoration: underline;
}
.item {
  padding: 20px 32px 32px;
}
.item-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 14px;
}
.item-bar .space {
  flex: 1 1 auto;
}
.item-bar .turn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.ghost {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
}
.item-title {
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  margin-bottom: 4px;
}
.item-meta {
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-foreground);
}
.item-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.item-section .section-label {
  margin-bottom: 8px;
}
.item-lead {
  font-size: 17px;
  line-height: 26px;
}
.by {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.field-look {
  min-height: 56px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--muted-foreground);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.blocked {
  display: inline-block;
  margin-top: 4px;
  padding: 0 6px;
  border: 1px dashed var(--muted-foreground);
  border-radius: 4px;
  font-size: 12px;
  line-height: 18px;
}
.blocked code {
  font-size: 12px;
}

/* How the turn passes */

.passes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.passes li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
}
.passes .n {
  font-family: var(--font-code);
  color: var(--muted-foreground);
  font-size: 13px;
}
.passes .who-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.passes .what {
  flex: 1 1 auto;
}
.passes .next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-foreground);
}

/* The tabs */

.tab-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
}
.tab-grid li {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

/* Agents */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 56px;
  align-items: start;
}
.can {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}
.can ul {
  margin: 0;
  padding-left: 18px;
}
.can li {
  margin: 4px 0;
}
.terminal {
  border-radius: 8px;
  background: var(--cmd-ground);
  border: 1px solid var(--cmd-line);
  color: var(--cmd-text);
  overflow: hidden;
}
.terminal .bar {
  padding: 8px 16px;
  border-bottom: 1px solid var(--cmd-line);
  font-size: 12px;
  color: var(--cmd-quiet);
}
.terminal pre {
  margin: 0;
  padding: 16px;
  font-size: 13px;
  line-height: 21px;
  overflow-x: auto;
  white-space: pre;
}
.terminal .prompt {
  color: var(--cmd-accent);
}
.terminal .comment {
  color: var(--cmd-quiet);
}

/* Local or server */

.places {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.place {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
}
.place h3 {
  font-size: 18px;
  line-height: 26px;
}
.place ul {
  margin: 12px 0 0;
  padding-left: 18px;
}
.place li {
  margin: 6px 0;
}

/* Open source */

.licences {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
.licences caption {
  text-align: left;
  padding-bottom: 8px;
}
.licences th,
.licences td {
  text-align: left;
  vertical-align: top;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-weight: 400;
}
.licences td {
  padding-left: 16px;
  font-family: var(--font-code);
  white-space: nowrap;
}
.def-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.def-list li {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

/* Quick start */

.steps3 {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.steps3 li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.steps3 .h {
  font-weight: 600;
  font-size: 15px;
}
.code-line {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--cmd-ground);
  color: var(--cmd-text);
  font-size: 13px;
  line-height: 20px;
  overflow-x: auto;
  white-space: pre;
}
.code-line .prompt {
  color: var(--cmd-accent);
}

/* ---------- Docs and text pages ---------- */

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 200px;
  gap: 48px;
  align-items: start;
  padding-top: 40px;
}
.doc-layout.two-col {
  grid-template-columns: 220px minmax(0, 1fr);
}
.doc-nav,
.toc {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  font-size: 13px;
  line-height: 20px;
}
.doc-nav .title {
  font-weight: 600;
  font-size: 15px;
}
.doc-nav .sub {
  color: var(--muted-foreground);
  margin-bottom: 16px;
}
.doc-nav h2,
.toc h2 {
  margin: 20px 0 6px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.toc h2 {
  margin-top: 0;
}
.doc-nav ul,
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.doc-nav a,
.toc a {
  display: block;
  padding: 5px 10px;
  border-left: 2px solid var(--border);
  color: var(--foreground-soft);
  text-decoration: none;
}
.doc-nav a:hover,
.toc a:hover {
  color: var(--foreground);
  border-left-color: var(--border-strong);
}
.doc-nav a[aria-current='page'] {
  color: var(--primary);
  font-weight: 500;
  border-left-color: var(--primary);
  background: var(--selected);
}
.toc a[aria-current='location'] {
  color: var(--primary);
  border-left-color: var(--primary);
}

.prose {
  max-width: 720px;
  min-width: 0;
  font-size: 15px;
  line-height: 24px;
}
.crumbs {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.prose h1 {
  font-size: 32px;
  line-height: 40px;
  margin-bottom: 12px;
}
.prose .page-lead {
  font-size: 17px;
  line-height: 26px;
  color: var(--foreground-soft);
  margin: 0 0 24px;
}
.prose h2 {
  font-size: 22px;
  line-height: 30px;
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 16px;
}
.prose h3 {
  font-size: 17px;
  line-height: 26px;
  margin: 28px 0 8px;
  scroll-margin-top: 16px;
}
.prose p,
.prose ul,
.prose ol,
.prose dl {
  margin: 0 0 16px;
}
.prose ul,
.prose ol {
  padding-left: 22px;
}
.prose li {
  margin: 4px 0;
}
.prose li > p {
  margin: 0 0 8px;
}
.prose dt {
  font-weight: 600;
  margin-top: 12px;
}
.prose dd {
  margin: 2px 0 0;
}
.prose :not(pre) > code {
  font-size: 13px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--muted);
  color: var(--foreground);
}
.prose pre {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 21px;
  overflow-x: auto;
  white-space: pre;
}
.prose pre .prompt,
.prose pre .comment {
  color: var(--muted-foreground);
}
.prose .cmd {
  margin: 0 0 20px;
}
.table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 21px;
}
.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--border);
}
.prose th {
  font-weight: 600;
  border-bottom-color: var(--border-strong);
}
.prose blockquote {
  margin: 0 0 16px;
  padding: 0 0 0 16px;
  border-left: 3px solid var(--border-strong);
  color: var(--foreground-soft);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}
.doc-foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted-foreground);
}
.doc-index {
  list-style: none;
  padding: 0 !important;
}
.doc-index li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.doc-index a {
  font-weight: 500;
}
.doc-index span {
  display: block;
  color: var(--muted-foreground);
  font-size: 14px;
}

.text-page {
  padding-top: 40px;
}
.text-page .prose {
  max-width: 760px;
}
address {
  font-style: normal;
}

/* ---------- Demo ---------- */

.demo-intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 56px;
  padding-top: 48px;
  padding-bottom: 32px;
}
.demo-intro h1 {
  font-size: 32px;
  line-height: 40px;
  margin-bottom: 12px;
}
.demo-intro p {
  font-size: 15px;
  line-height: 24px;
  max-width: 640px;
}
.demo-intro h2 {
  font-size: 16px;
  margin-bottom: 12px;
}
.demo-intro ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--foreground-soft);
}
.demo-intro li {
  margin: 4px 0;
}
.shots {
  display: grid;
  gap: 48px;
  padding-bottom: 24px;
}
.shot {
  margin: 0;
}
.shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
}
.shot figcaption {
  margin-top: 12px;
  max-width: 760px;
  font-size: 14px;
  line-height: 21px;
  color: var(--foreground-soft);
}
.shot figcaption strong {
  color: var(--foreground);
  font-weight: 600;
}

/* ---------- Contact form ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 32px 64px;
  align-items: start;
}
.form {
  display: grid;
  gap: 18px;
  max-width: 600px;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}
.field .hint {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-foreground);
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-size: 15px;
}
.field textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 22px;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--muted);
}
.form-status:empty {
  display: none;
}
.form-status.is-error {
  border-color: var(--destructive);
}
.form-status.is-done {
  border-color: var(--primary);
}

/* ---------- 404 ---------- */

.not-found {
  padding-top: 80px;
  max-width: 640px;
}
.not-found h1 {
  font-size: 32px;
  line-height: 40px;
  margin-bottom: 12px;
}

/* ---------- Narrower screens ---------- */

@media (max-width: 1100px) {
  .doc-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .doc-layout .toc {
    display: none;
  }
  .app-body {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .hero,
  .split,
  .demo-intro,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .passes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .app-list {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .doc-layout,
  .doc-layout.two-col {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 24px;
  }
  .doc-nav {
    position: static;
    max-height: none;
    order: 2;
    border-top: 1px solid var(--border);
    padding-top: 16px;
  }
  .doc-layout .toc,
  .doc-layout.two-col .toc {
    display: none;
  }
}

@media (max-width: 639.98px) {
  :root {
    --gutter: 16px;
  }
  .site-header .wrap {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .header-rule {
    display: none;
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin: 0 -12px;
  }
  .site-nav a {
    min-height: 44px;
  }
  .github-note {
    margin-left: auto;
  }
  .hero {
    padding-top: 32px;
  }
  .hero h1 {
    font-size: 32px;
    line-height: 40px;
  }
  .hero .lead {
    font-size: 17px;
    line-height: 26px;
  }
  .btn {
    min-height: 44px;
  }
  .cmd code {
    font-size: 15px;
  }
  .passes,
  .tab-grid,
  .can,
  .places,
  .steps3,
  .two {
    grid-template-columns: minmax(0, 1fr);
  }
  .band {
    padding: 40px 0;
  }
  .app-address {
    display: none;
  }
  .app-top .project,
  .app-top .rule {
    display: none;
  }
  .line {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 10px 16px;
  }
  .line.selected {
    padding-inline-start: 13px;
  }
  .line .r {
    text-align: left;
  }
  .kind {
    padding-top: 0;
  }
  .app-list-head {
    padding: 14px 16px 10px;
  }
  .item {
    padding: 16px 16px 24px;
  }
  .host-bar {
    padding: 0 16px;
  }
  .prose h1,
  .demo-intro h1 {
    font-size: 26px;
    line-height: 34px;
  }
  .field input,
  .field textarea {
    font-size: 16px;
    min-height: 44px;
  }
}

@media (pointer: coarse) {
  .btn,
  .cmd-copy {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .mark-you,
  .mark-agent,
  .pill {
    forced-color-adjust: none;
  }
}
