/* trust: whose this is. The home sections `yours` and `questions`, and /privacy/, /questions/, /open-source/.
   Every class starts with ts-. The pictures are drawn as the app draws its own surfaces: a window with its lights,
   a sheet a step lighter than the chrome, rows split by hairlines; the only colour is a state (a dot, a seal). */

/* ---------------------------------------------------------------- shared: a window, a bar, a tile */
.ts-win { position: relative; border-radius: 16px; background: #fff; color: var(--ink); font-size: 13.5px; line-height: 1.4;
  box-shadow: var(--lift); overflow: hidden; text-align: left; }
.ts-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; background: #f1f1ef;
  border-bottom: 1px solid var(--line); }
.ts-bar.dark { background: #1c1c1f; border-bottom-color: #ffffff14; color: #ffffffb3; }
.ts-lights { display: flex; gap: 7px; } .ts-lights i { width: 11px; height: 11px; border-radius: 50%; background: #0000001f; }
.ts-bar.dark .ts-lights i { background: #ffffff26; }
.ts-bar-t { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.ts-bar.dark .ts-bar-t { color: #ffffffb3; }
.ts-win code, .ts-term code, .ts-body code, .ts-note code { font: 12.5px/1.4 ui-monospace, "SF Mono", Menlo, monospace; }

/* ---------------------------------------------------------------- home: yours */
.ts-desk { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 12px; }
.ts-c-repo { grid-column: 1 / -1; }
.ts-cell { margin: 0; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 24px; background: var(--card); min-width: 0; }
.ts-cell figcaption { font-size: 13px; color: var(--muted); }
.ts-note { margin-top: auto; padding-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.ts-note code { padding: 1px 5px; border-radius: 5px; background: #0000000a; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }

/* the folder */
.ts-path { padding: 10px 16px 8px; color: var(--faint); border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-path code { font-size: 12px; }
.ts-frows { padding: 6px 8px 10px; }
.ts-frow { display: grid; grid-template-columns: 14px 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 10px; }
.ts-frow + .ts-frow, .ts-history + .ts-frow { border-top: 1px solid var(--line); border-radius: 0; }
.ts-frow.open { background: #f6f6f5; border-radius: 10px; }
.ts-chev { color: var(--faint); display: grid; } .ts-frow.open .ts-chev { transform: rotate(90deg); }
.ts-ftile { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #0000000a; color: var(--ink); }
.ts-frow.open .ts-ftile { background: var(--ink); color: #fff; }
.ts-fname { display: flex; flex-direction: column; min-width: 0; }
.ts-fname code { font-size: 13px; font-weight: 600; color: var(--ink); }
.ts-fname span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-fig { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ts-history { list-style: none; padding: 4px 8px 8px 60px; margin: 0; position: relative; }
.ts-history::before { content: ""; position: absolute; left: 67px; top: 14px; bottom: 18px; width: 1.5px; background: #00000014; }
.ts-commit { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 5px 0 5px 22px; font-size: 12.5px; }
.ts-commit i { position: absolute; left: 3px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px #00000040; }
.ts-commit.you i { background: var(--ink); box-shadow: none; }
.ts-commit.shipped i { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ts-commit.more i { background: transparent; box-shadow: none; }
.ts-commit.more i::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #00000026; }
.ts-cwhat { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-commit.more .ts-cwhat { color: var(--faint); }
.ts-cwho { color: var(--faint); font-size: 11.5px; }
.ts-commit.shipped .ts-cwho { color: var(--ink); background: #0000000a; padding: 0 6px; border-radius: 5px; }
.ts-cwhen { width: 46px; text-align: right; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* what leaves */
.ts-ledger { flex: 1; display: flex; flex-direction: column; }
.ts-ledger ul { flex: 1; display: flex; flex-direction: column; justify-content: space-around; list-style: none; padding: 6px 14px; margin: 0; }
.ts-ledger li, .ts-makers { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.ts-ledger li + li { border-top: 1px solid var(--line); }
.ts-ltile { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: #0000000a; color: var(--ink); }
.ts-ltile.dark { background: var(--ink); color: #fff; }
.ts-lwho { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ts-lwho b { font-weight: 600; font-size: 13px; }
.ts-lwho span { color: var(--muted); font-size: 12.5px; }
.ts-out { color: var(--faint); }
.ts-makers { padding: 12px 14px; background: #f6f6f5; border-top: 1px solid var(--line); }

/* the repository */
.ts-rhead { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ts-rhead b { font-weight: 600; }
.ts-rlic { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px;
  background: #0000000a; font-size: 12px; color: var(--ink); }
.ts-repo ul, .ts-tree ul { list-style: none; padding: 4px 14px 8px; margin: 0; }
/* on home the repository is a strip: one column per folder or file */
.ts-repo ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0; }
.ts-repo li { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.ts-repo li + li { border-left: 1px solid var(--line); }
.ts-repo .ts-rname { justify-content: flex-start; }
.ts-repo .ts-rlang { margin-left: auto; font-weight: 400; }
.ts-tree li + li { border-top: 1px solid var(--line); }
.ts-rname, .ts-tname { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.ts-rname .ic, .ts-tname .ic { color: var(--faint); }
.ts-rwhat, .ts-twhat { color: var(--muted); font-size: 12.5px; }
.ts-rwhat code { font-size: 11.5px; }
.ts-rlang { font-size: 11.5px; color: var(--faint); white-space: nowrap; }

.ts-after { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; margin-top: 32px; }

/* ---------------------------------------------------------------- home: questions */
.ts-qside { display: flex; flex-direction: column; }
.ts-ask-wrap { margin: 40px 0 0; max-width: 360px; }
.ts-ask { padding: 14px; border-radius: 18px; background: #fff; box-shadow: var(--lift); font-size: 13.5px; }
.ts-ask-from { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12px; }
.ts-ask-q { margin: 6px 0 12px; font-size: 15px; line-height: 1.45; }
.ts-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-opt { padding: 5px 12px; border-radius: 15px; box-shadow: inset 0 0 0 1px #0000001f; font-size: 13px; white-space: nowrap; }
.ts-opt.on { background: var(--ink); color: #fff; box-shadow: none; }
.ts-ask-field { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; height: 34px; padding: 0 4px 0 12px;
  border-radius: 10px; box-shadow: inset 0 0 0 1px #00000014; color: var(--faint); }
.ts-send { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #0000000f; color: var(--faint); }
.ts-ask-wrap figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------------------------------------------------------------- the pages: a row's body */
.ts-body { min-width: 0; }
.ts-lede { max-width: 620px; margin-bottom: 24px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.ts-text.ts-big p { font-size: 18px; color: var(--ink); line-height: 1.55; }
.ts-text.ts-big p + p { color: var(--muted); font-size: 16px; }
.ts-pic { margin: 24px 0; } .ts-pic:first-child { margin-top: 0; } .ts-pic:last-child { margin-bottom: 0; }
.ts-body > .facts + .ts-pic { margin-top: 32px; }
.ts-strong { margin-top: 20px; font-size: 16px; line-height: 1.55; color: var(--ink); }
.ts-small { margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 620px; }
.ts-small code, .ts-remove code, .ts-paths code { padding: 2px 6px; border-radius: 6px; background: #0000000a; color: var(--ink); font-size: 12.5px; overflow-wrap: anywhere; }
.ts-warn { display: flex; gap: 12px; margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: var(--card);
  font-size: 15px; line-height: 1.55; color: var(--ink); }
.ts-warn .ic { margin-top: 3px; color: #b9561c; }
.ts-os { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }

/* the folder on each system */
.ts-paths { width: 100%; border-collapse: collapse; margin-bottom: 28px; font-size: 14px; }
.ts-paths th { text-align: left; font-weight: 400; font-size: 13px; color: var(--faint); padding: 0 16px 10px 0; }
.ts-paths tbody th { font-size: 15px; color: var(--ink); padding: 14px 16px 14px 0; border-top: 1px solid #00000014; }
.ts-paths td { padding: 14px 16px 14px 0; border-top: 1px solid #00000014; vertical-align: middle; }
.ts-paths td:last-child { padding-right: 0; }

/* Settings, as the app draws a section */
.ts-settings { max-width: 560px; }
.ts-sheet { padding: 18px 18px 20px; background: #fff; }
.ts-sheet h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 14px; }
.ts-sgl { font-size: 12.5px; color: var(--muted); margin: 0 0 6px 2px; }
.ts-sgroup { border-radius: 12px; box-shadow: inset 0 0 0 1px #00000014; }
.ts-srow { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.ts-srow + .ts-srow { border-top: 1px solid var(--line); }
.ts-srow > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ts-srow b { font-weight: 500; }
.ts-srow > div > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.ts-sbtn { flex: none; padding: 5px 11px; border-radius: 8px; background: #0000000a; font-size: 12.5px; white-space: nowrap; }
.ts-dtile { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; background: #0000000a; }
.ts-on { width: 7px; height: 7px; border-radius: 50%; background: #3e7d1c; flex: none; }

/* directly, sealed */
.ts-net { position: relative; height: 290px; border-radius: 24px; background: var(--card); overflow: hidden; }
.ts-net-lines { position: absolute; left: 0; top: 0; width: 100%; height: 260px; }
.ts-net-lines path { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.ts-node { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: 13px;
  transform: translateX(-50%); }
.ts-node b { font-weight: 600; white-space: nowrap; } .ts-node span { color: var(--muted); font-size: 12px; }
.ts-ntile { width: 44px; height: 44px; margin-bottom: 6px; border-radius: 12px; display: grid; place-items: center; background: #fff; box-shadow: var(--lift); }
.ts-node.host { left: 50%; top: 20px; } .ts-node.host .ts-ntile { width: 52px; height: 52px; background: var(--ink); color: #fff; }
.ts-node.a { left: 18%; top: 166px; } .ts-node.b { left: 82%; top: 166px; }
.ts-seal { position: absolute; top: 134px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px;
  background: #fff; box-shadow: var(--lift); font-size: 11.5px; color: #2c6a12; }
.ts-seal.l { left: 27%; } .ts-seal.r { right: 27%; }
.ts-nonet { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); white-space: nowrap; }
.ts-sealed { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ts-sealed li { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 16px; box-shadow: inset 0 0 0 1px #00000014; }
.ts-sealed b { font-weight: 600; font-size: 15px; } .ts-sealed span { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* what leaves: the base table, with a little more room for the middle column */
.ts-leaves td:first-child { width: 40%; }
.ts-leaves td:nth-child(2) { color: var(--ink); }

/* removing it */
.ts-remove { list-style: none; padding: 0; }
.ts-remove li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-top: 1px solid #00000014;
  font-size: 15px; line-height: 1.55; color: var(--muted); }
.ts-remove li:last-child { border-bottom: 1px solid #00000014; }
.ts-remove .ts-os { color: var(--ink); align-self: start; padding-top: 1px; }

/* ---------------------------------------------------------------- /open-source/ */
/* Two lanes in a grid: row 1 what shipped, row 2 your copy; each column one event. Rows have fixed heights so the
   lanes and the merge lines can be placed by numbers, not measured. */
.ts-branch { border-radius: 24px; background: var(--card); overflow-x: auto; }
.ts-branch-in { position: relative; display: grid; grid-template-columns: 112px repeat(var(--n), minmax(0, 1fr));
  grid-template-rows: auto auto; row-gap: 40px; padding: 24px 24px 22px 20px; min-width: 620px; }
.ts-lname { display: inline-flex; align-items: center; gap: 6px; height: 12px; font-size: 12.5px; color: var(--muted); grid-column: 1; }
.ts-lname.ship { grid-row: 1; align-self: end; } .ts-lname.mine { grid-row: 2; align-self: start; color: var(--ink); font-weight: 500; }
.ts-lane { grid-column: 2 / -1; height: 2px; }
.ts-lane.ship { align-self: end; margin-bottom: 5px; } .ts-lane.mine { align-self: start; margin-top: 5px; }
.ts-lane.ship { grid-row: 1; background: #00000026; } .ts-lane.mine { grid-row: 2; background: var(--ink); }
.ts-col { display: contents; }
.ts-ev { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; min-width: 0; }
.ts-col:nth-of-type(1) .ts-ev { grid-column: 2; } .ts-col:nth-of-type(2) .ts-ev { grid-column: 3; }
.ts-col:nth-of-type(3) .ts-ev { grid-column: 4; } .ts-col:nth-of-type(4) .ts-ev { grid-column: 5; }
.ts-col:nth-of-type(5) .ts-ev { grid-column: 6; } .ts-col:nth-of-type(6) .ts-ev { grid-column: 7; }
.ts-col .ts-ev:first-child { grid-row: 1; } .ts-col .ts-ev:last-child { grid-row: 2; }
.ts-ev i { width: 12px; height: 12px; margin-bottom: 4px; border-radius: 50%; flex: none; }
/* what shipped reads upwards from its dot, so the dot sits on the lane at the foot of the row */
.ts-ev.ship { flex-direction: column-reverse; align-self: end; } .ts-ev.ship i { margin: 4px 0 0; }
.ts-ev.mine, .ts-ev.merged { align-self: start; }
.ts-ev b { font-size: 12.5px; font-weight: 500; line-height: 1.25; padding: 0 4px; }
.ts-ev small { font-size: 11.5px; color: var(--faint); }
.ts-ev.ship i { background: var(--card); box-shadow: inset 0 0 0 2px #00000059; }
.ts-ev.mine i { background: var(--ink); }
.ts-ev.merged i { background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); }
.ts-ev.merged b { color: var(--muted); font-weight: 400; }
/* the merge: a dashed line from the version's dot down to your lane (row height 56 + gap 36, less the dots) */
.ts-ev.merged::before { content: ""; position: absolute; left: calc(50% - .75px); top: -46px; height: 46px; border-left: 1.5px dashed #00000059; }
.ts-tree ul.ts-files { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: #f6f6f5; }
.ts-tree .ts-files li { border: 0; padding: 0; }
.ts-tree .ts-files .ts-tname { font-weight: 400; color: var(--muted); }
.ts-tree li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 12px 0; }
.ts-twhat { font-size: 13.5px; line-height: 1.5; }

.ts-term { border-radius: 16px; overflow: hidden; background: #141416; color: #ffffffe0; box-shadow: var(--lift); }
.ts-term-in { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; overflow-x: auto; }
.ts-cmd { display: flex; align-items: baseline; gap: 14px; white-space: nowrap; }
.ts-cmd code { white-space: nowrap; font-size: 13px; }
.ts-prompt { color: #ffffff66; }
.ts-cnote { color: #ffffff73; font: 12.5px/1.4 ui-monospace, "SF Mono", Menlo, monospace; }

.ts-counts { list-style: none; padding: 0; }
.ts-counts li { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid #00000014; font-size: 15px; line-height: 1.55; }
.ts-counts li:last-child { border-bottom: 1px solid #00000014; }
.ts-counts .ic { margin-top: 4px; color: var(--faint); }

/* ---------------------------------------------------------------- /questions/: an index of the groups */
.ts-index { position: sticky; top: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 24px; padding: 6px;
  width: fit-content; max-width: 100%; border-radius: 16px; background: #ffffffe6; box-shadow: var(--lift);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ts-index a { padding: 7px 12px; border-radius: 10px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.ts-index a:hover { background: #0000000a; color: var(--ink); }
.ts-index a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ts-rows > .two { scroll-margin-top: 72px; }
/* a row's heading stays in sight while its long body passes */
.ts-rows > .two > h2 { position: sticky; top: 32px; }
.ts-text p { max-width: 620px; }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 980px) {
  .ts-desk { grid-template-columns: minmax(0, 1fr); }
  .ts-repo ul { grid-template-columns: minmax(0, 1fr); }
  .ts-repo li { flex-direction: row; align-items: baseline; gap: 12px; padding: 9px 14px; }
  .ts-repo li + li { border-left: 0; border-top: 1px solid var(--line); }
  .ts-repo .ts-rname { flex: none; width: 150px; }
  .ts-repo .ts-rlang { margin-left: 8px; }
    .ts-ask-wrap { margin-top: 24px; }
  .ts-index { position: static; }
  .ts-rows > .two > h2 { position: static; }
}
@media (max-width: 620px) {
  .ts-cell { padding: 14px; border-radius: 20px; }
  .ts-frow { grid-template-columns: 12px 28px minmax(0, 1fr); }
  .ts-fig { display: none; }
  .ts-history { padding-left: 44px; } .ts-history::before { left: 51px; }
  .ts-cwho { display: none; }
  .ts-tree li { grid-template-columns: minmax(0, 1fr) auto; }
  .ts-twhat { grid-column: 1 / -1; grid-row: 2; }
  .ts-paths thead { display: none; }
  .ts-paths tr { display: block; padding: 14px 0; border-top: 1px solid #00000014; }
  .ts-paths tbody th, .ts-paths td { display: block; padding: 0 0 8px; border: 0; }
  .ts-paths td::before { content: attr(data-th); display: block; font-size: 12px; color: var(--faint); margin-bottom: 2px; }
  .ts-sealed { grid-template-columns: minmax(0, 1fr); }
  .ts-repo li { flex-direction: column; gap: 2px; }
  .ts-repo .ts-rname { width: auto; }
  .ts-remove li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ts-sheet { padding: 14px 12px 14px; }
  .ts-srow { padding: 10px 12px; }
  .ts-sbtn.rename { display: none; }
  /* the devices: the computer on top, the two windows under it, and the note under them */
  .ts-net { height: 300px; }
  .ts-seal { display: none; }
  /* your copy: four events, the lane names in the corners */
  .ts-branch-in { min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 56px 8px 48px; }
  .ts-lname, .ts-lname.ship, .ts-lname.mine { position: absolute; left: 14px; grid-area: auto; } .ts-lname.ship { top: 16px; } .ts-lname.mine { top: auto; bottom: 16px; }
  .ts-lane { grid-column: 1 / -1; }
  .ts-col:nth-of-type(1) .ts-ev { grid-column: 1; } .ts-col:nth-of-type(2) .ts-ev { grid-column: 2; }
  .ts-col:nth-of-type(3) .ts-ev { grid-column: 3; } .ts-col:nth-of-type(4) .ts-ev { grid-column: 4; }
  .ts-col:nth-of-type(n+5) { display: none; }
  .ts-ev b { font-size: 12px; }
  .ts-text.ts-big p { font-size: 17px; }
  .ts-cmd { flex-direction: column; gap: 2px; white-space: normal; }
  .ts-cmd + .ts-cmd { margin-top: 6px; }
  .ts-cnote { padding-left: 14px; }
  .ts-index { flex-wrap: nowrap; overflow-x: auto; width: auto; margin-left: -4px; margin-right: -4px; scrollbar-width: none; }
  .ts-index::-webkit-scrollbar { display: none; }
}
