
@font-face { font-family: "Archivo"; src: url("/help/fonts/Archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("/help/fonts/MartianMono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
/* Layout measured from linear.app/docs: 280px sidebar (64px header, 28px group labels, 32px rows, child pages open under the current parent, fixed footer); 64px breadcrumb bar; one centred column, with 'On this page' on the right of articles; Home = title, intro, 4-across card grids. Hook colours and type, square corners. Red only marks the current page. */
:root {
  --bg: #F9F7F0; --bg-2: #F2EFE6; --line: #E3DFD4; --line-2: #D2CDBF;
  --ink: #0D0D0C; --text: #2E2C29; --muted: #6B675F; --faint: #8F8A80;
  --red: #FF2E17; --link: #0D0D0C; --shot-line: #D2CDBF;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0D0D0C; --bg-2: #161514; --line: #24221F; --line-2: #34312D; --ink: #F9F7F0; --text: #D8D4CA; --muted: #A09B91; --faint: #77736B; --link: #F9F7F0; --shot-line: #34312D; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0D0D0C; --bg-2: #161514; --line: #24221F; --line-2: #34312D; --ink: #F9F7F0; --text: #D8D4CA; --muted: #A09B91; --faint: #77736B; --link: #F9F7F0; --shot-line: #34312D; color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
svg.lucide { width: 16px; height: 16px; flex: none; stroke-width: 1.6; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--bg); }

.app { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }

/* sidebar (Linear: 64px header, 28px section labels, 32px rows, fixed footer) */
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); padding-left: env(safe-area-inset-left, 0px); }
.side-top { height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { height: 19px; width: auto; display: block; }
.brand .sep { width: 1px; height: 16px; background: var(--line-2); }
.brand .nm { font-size: 15px; font-weight: 500; }
.round { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--muted); }
.round:hover { color: var(--ink); background: var(--bg-2); }
.nav { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 28px; scrollbar-width: thin; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
.grp { margin-bottom: 14px; }
.grp .lab { display: flex; align-items: center; height: 28px; padding: 0 8px; font-size: 12px; font-weight: 500; color: var(--faint); }
.it { position: relative; display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 5px 10px 5px 8px; font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--muted); text-decoration: none; }
.it:hover { color: var(--ink); background: var(--bg-2); }
.it.on { color: var(--ink); background: var(--bg-2); }
.it.on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--red); }
.it svg.lucide { color: var(--faint); }
.it.on svg.lucide, .it:hover svg.lucide { color: var(--ink); }
.it .chev { margin-left: auto; width: 14px; height: 14px; transition: transform .15s; }
.it.open .chev { transform: rotate(90deg); }
/* child pages: a tree like Linear's, a vertical line from the parent icon plus a square elbow per child */
.kids { margin: 2px 0 6px 16px; }
.kid { position: relative; padding-left: 12px; }
.kid::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.kid:last-child::before { bottom: auto; height: 15px; }
.kid::after { content: ""; position: absolute; left: 0; top: 15px; width: 9px; height: 1px; background: var(--line-2); }
.kids .it { min-height: 30px; padding-left: 10px; font-size: 13.5px; }
.kids .it.on::before { left: 0; top: 6px; bottom: 6px; }
.foot { flex: none; border-top: 1px solid var(--line); padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }

/* top bar */
.mainwrap { min-width: 0; }
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; height: 64px; display: flex; align-items: center; gap: 8px; padding-left: 24px; padding-right: max(16px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: var(--bg); }
.bar .mbrand { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; overflow: hidden; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sl { color: var(--line-2); }
.crumbs .cur { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.bar .sp { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--line-2); color: var(--ink); }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.solid:hover { opacity: .88; color: var(--bg); }
.btn svg.lucide { width: 14px; height: 14px; }
.menubtn, .msearch { display: none; }
/* split "Copy page" button with a menu, like Linear's docs */
.split { position: relative; display: inline-flex; }
.split .btn:hover, .split .btn[aria-expanded="true"] { position: relative; z-index: 1; border-color: var(--line-2); color: var(--ink); }
.split .main { border-radius: 999px 0 0 999px; padding: 0 11px 0 13px; }
.split .more { border-radius: 0 999px 999px 0; margin-left: -1px; width: 32px; padding: 0 2px 0 0; justify-content: center; }
.menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: 272px; padding: 4px; background: var(--bg); border: 1px solid var(--line-2); box-shadow: 0 10px 28px rgba(13, 13, 12, .14); }
.menu [role="menuitem"] { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: start; width: 100%; padding: 8px 10px; border: 0; background: transparent; text-align: left; text-decoration: none; color: var(--text); cursor: pointer; }
.menu [role="menuitem"]:hover, .menu [role="menuitem"]:focus-visible { background: var(--bg-2); outline: none; }
.menu svg.lucide { margin-top: 2px; color: var(--muted); }
.menu .t { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.menu .d { display: block; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.menu .ext { width: 14px; height: 14px; }

/* content: one centred 976px column; article pages add "On this page" on the right */
.page { max-width: 1040px; margin: 0 auto; padding: 48px 32px 96px; }
.doc.article { display: grid; grid-template-columns: minmax(0, 1fr) 232px; column-gap: 72px; }
.art { min-width: 0; }
.doc:not(.home) .art { max-width: 680px; }
.toc { display: none; }
.article .toc { display: block; }
.toc .in { position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow-y: auto; }
.toc .tt { font-size: 12px; font-weight: 500; color: var(--faint); margin: 2px 0 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; position: relative; padding: 4px 0 4px 13px; font-size: 13px; line-height: 1.45; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); font-weight: 500; }
.toc a.on::before { content: ""; position: absolute; left: -1px; top: 5px; bottom: 5px; width: 1.5px; background: var(--ink); }
.toc li.h3 a { padding-left: 25px; font-size: 12.5px; }

.page h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); margin: 0 0 16px; text-wrap: balance; }
.home h1 { font-size: 40px; margin-bottom: 14px; }
.page .sub { font-size: 16px; color: var(--muted); margin: 0 0 32px; max-width: 64ch; }
.page h2 { position: relative; font-size: 24px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; color: var(--ink); margin: 56px 0 14px; }
.home h2 { font-size: 20px; margin: 48px 0 20px; }
.page h3 { position: relative; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; color: var(--ink); margin: 36px 0 10px; }
.page h2 + h3 { margin-top: 20px; }
.page .anc { display: inline-grid; place-items: center; vertical-align: middle; width: 24px; height: 24px; margin-left: 6px; color: var(--faint); opacity: 0; text-decoration: none; }
.page h3 .anc, .faq .anc { width: 20px; height: 20px; margin-left: 4px; }
.page h2:hover .anc, .page h3:hover .anc, .faq summary:hover .anc, .page .anc:focus-visible { opacity: 1; }
.page .anc:hover { color: var(--ink); }
.page .anc svg.lucide { width: 15px; height: 15px; }
/* plan note (Linear: "Available to workspaces on the Business and Enterprise plans.") */
.page .plan { background: var(--bg-2); border: 1px solid var(--line); padding: 10px 14px; margin: -8px 0 28px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.page .plan b, .page .plan a { color: var(--ink); }
/* keyboard keys */
.page kbd { display: inline-block; min-width: 21px; padding: 0 5px; font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 18px; text-align: center; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-bottom-width: 2px; vertical-align: 1px; white-space: nowrap; }
/* FAQ accordions */
.faq { border-bottom: 1px solid var(--line); }
:not(.faq) + .faq, .faq:first-child { border-top: 1px solid var(--line); margin-top: 8px; }
.faq + :not(.faq) { margin-top: 28px; }
.faq summary { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; list-style: none; cursor: pointer; font-weight: 500; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q { flex: 1; min-width: 0; }
.faq summary .chev { width: 16px; height: 16px; margin-top: 4px; color: var(--faint); transition: transform .15s; }
.faq summary:hover .chev { color: var(--ink); }
.faq[open] > summary .chev { transform: rotate(90deg); }
.page .faq > :not(summary) { margin-left: 26px; }
.page .faq > :last-child:not(summary) { margin-bottom: 16px; }
/* full-column hero images and looping clips */
.hero, .loop { margin: 4px 0 32px; }
.hero .frame, .loop .frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 1px solid var(--shot-line); background: var(--bg-2); overflow: hidden; line-height: 0; }
.hero .frame { cursor: zoom-in; }
.hero img, .loop video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero figcaption, .loop figcaption { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--faint); }
.loop .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 999px; background: rgba(13, 13, 12, .72); color: #F9F7F0; cursor: pointer; transition: opacity .15s; }
.loop.manual .play { display: grid; }
.loop.manual.playing .play { opacity: 0; }
.loop.manual.playing .frame:hover .play, .loop .play:focus-visible { opacity: 1; }
.loop .play svg.lucide { width: 18px; height: 18px; }
.page p { margin: 0 0 14px; }
.page ul, .page ol { margin: 0 0 16px; padding-left: 22px; }
.page li { margin-bottom: 6px; padding-left: 2px; }
.page b { color: var(--ink); font-weight: 600; }
.page .art a:not(.card):not(.anc) { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.page .art a:not(.card):not(.anc):hover { text-decoration-color: var(--ink); }
.page code { font-family: var(--mono); font-size: 12.5px; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 5px; }
.page pre { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: var(--bg-2); border: 1px solid var(--line); padding: 14px 16px; overflow-x: auto; margin: 0 0 16px; }
.page pre code { background: none; border: 0; padding: 0; }
.tw { overflow-x: auto; margin: 4px 0 20px; }
.page table { width: 100%; border-collapse: collapse; font-size: 14px; }
.page th { text-align: left; font-weight: 600; color: var(--ink); padding: 8px 16px 8px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.page td { padding: 9px 16px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.callout { display: flex; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); padding: 12px 16px; margin: 20px 0; font-size: 14.5px; }
.callout svg.lucide { margin-top: 3px; color: var(--muted); }
.prompt { position: relative; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); padding: 14px 48px 14px 16px; margin: 0 0 16px; overflow-wrap: anywhere; }
.prompt .copy { position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg); cursor: pointer; color: var(--muted); }
.prompt .copy:hover { color: var(--ink); border-color: var(--line-2); }
.prompt .copy svg.lucide { width: 14px; height: 14px; }
.checklist { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin: 0 0 24px; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.checklist input { margin: 4px 0 0; width: 16px; height: 16px; accent-color: var(--ink); flex: none; cursor: pointer; }
.checklist label:has(input:checked) span { color: var(--faint); text-decoration: line-through; }

/* screenshots with numbered pins */
.scene { margin: 20px 0 28px; }
.shot { margin: 0 0 14px; }
.shot .frame { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--shot-line); background: var(--bg-2); line-height: 0; cursor: zoom-in; }
.shot.narrow .frame { max-width: 420px; }
.shot img { display: block; width: 100%; height: auto; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 20px; height: 20px; display: grid; place-items: center; background: #0D0D0C; color: #F9F7F0; box-shadow: 0 0 0 1.5px #F9F7F0; font-family: var(--mono); font-size: 10px; font-weight: 500; line-height: 1; pointer-events: none; }
.pin.on { background: var(--red); color: #0D0D0C; box-shadow: 0 0 0 1.5px #0D0D0C; }
.shot figcaption { margin-top: 8px; font-size: 13px; color: var(--faint); }
.steps li { cursor: default; }
.steps li.on { color: var(--ink); }

/* cards: home grid (icon top, text bottom, like Linear) and suggested articles */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 16px; margin: 0 0 8px; }
.card { display: flex; flex-direction: column; justify-content: space-between; min-height: 232px; border: 1px solid var(--line); background: var(--bg-2); text-decoration: none; color: inherit; min-width: 0; transition: border-color .15s, background-color .15s; }
.card:hover { border-color: var(--line-2); background: var(--bg); }
.card .top { padding: 22px 20px; }
.card .top svg.lucide { width: 20px; height: 20px; color: var(--ink); }
.card .body { padding: 20px; }
.card .t { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.card .d { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.suggest { margin-top: 64px; }
.suggest h2 { font-size: 20px !important; margin: 0 0 16px !important; }
.suggest .cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.suggest .card { min-height: 0; justify-content: flex-start; padding: 16px; gap: 10px; }
.suggest .card .top, .suggest .card .body { padding: 0; }
.suggest .card .top svg.lucide { width: 16px; height: 16px; }
.suggest .card .t { font-size: 14.5px; }
.suggest .card .d { font-size: 13px; margin-top: 2px; }

/* overlays */
dialog { border: 0; padding: 0; color: var(--text); background: var(--bg); }
dialog::backdrop { background: rgba(13, 13, 12, .6); }
#palette { width: min(600px, calc(100vw - 32px)); margin-top: 12vh; border: 1px solid var(--line-2); }
#palette .q { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
#palette input { flex: 1; height: 52px; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); outline: none; min-width: 0; }
#palette .res { max-height: min(56vh, 460px); overflow-y: auto; padding: 6px; }
#palette .res a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: center; padding: 9px 10px; text-decoration: none; color: inherit; }
#palette .res a.sel { background: var(--bg-2); }
#palette .res .t { display: block; font-size: 14.5px; font-weight: 500; color: var(--ink); }
#palette .res .hd { font-weight: 400; color: var(--muted); }
#palette .res .d { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#palette .empty { padding: 20px 12px; color: var(--muted); }
#drawer { width: min(320px, 86vw); max-width: none; height: 100%; max-height: none; margin: 0; border-right: 1px solid var(--line); }
#drawer .side { position: static; height: 100%; border-right: 0; }
#light { background: transparent; max-width: 96vw; }
#light img { display: block; max-width: 94vw; max-height: 90vh; width: auto; height: auto; border: 1px solid #34312D; }

@media (max-width: 1239px) {
  .doc.article { display: block; }
  .article .toc { display: none; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app > .side { display: none; }
  .menubtn, .msearch { display: inline-grid; }
  .bar { height: 56px; gap: 4px; padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  .bar .mbrand { display: flex; margin: 0 6px; }
  .crumbs { display: none; }
  .page { padding: 32px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px)); }
}
@media (max-width: 600px) {
  .split .main span, .bar .openapp { display: none; }
  .split .main { width: 34px; padding: 0 0 0 2px; justify-content: center; }
  .menu { position: fixed; top: 60px; right: 10px; width: min(272px, calc(100vw - 20px)); }
  .page h1 { font-size: 28px; }
  .home h1 { font-size: 32px; }
  .page h2 { font-size: 21px; margin-top: 44px; }
  .cards, .suggest .cards { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .card, .suggest .card { flex-direction: row; justify-content: flex-start; align-items: flex-start; min-height: 0; padding: 14px 16px; gap: 14px; }
  .card .top, .card .body { padding: 0; }
  .card .top { padding-top: 2px; }
  .card .d { font-size: 13.5px; }
  .home h2 { margin: 40px 0 14px; }
}
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
