/* All colors come from these tokens; xterm and Monaco themes derive from them later. */
:root {
  color-scheme: dark;
  --color-bg: #1b1d23;
  /* QR codes stay dark on light in both themes: scanners need that contrast. */
  --qr-dark: #000000;
  --qr-light: #ffffff;
  --color-bg-elevated: #23262e;
  /* Dividers only. Form controls use the strong border (3:1, WCAG 1.4.11; UI-C3). */
  --color-border: #343843;
  --color-border-strong: #6b7180;
  --color-text: #d7dae0;
  --color-text-muted: #8b91a0;
  --color-accent: #4f9cf9;
  --color-attention: #f2a33a;
  --color-success: #4cc38a;
  --color-danger: #ef5b5b;
  /* Diff rows of the web view's changes (follow the success/danger tokens in both themes). */
  --diff-added-bg: color-mix(in srgb, var(--color-success) 16%, transparent);
  --diff-removed-bg: color-mix(in srgb, var(--color-danger) 16%, transparent);
  /* Filled buttons: darker than the accent / danger text colors, so white text reaches 4.5:1. */
  --color-accent-fill: #2a6dcc;
  --color-danger-fill: #c43c3c;
  /* Text on a filled accent / danger / attention background. */
  --color-on-accent: #ffffff;
  --color-on-danger: #ffffff;
  --color-on-attention: #1b1d23;
  --font-ui: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;

  /* Editor (Monaco); its theme is read from these tokens. */
  --editor-bg: #1b1d23;
  --editor-fg: #d7dae0;
  --editor-line-highlight: #23262e;
  --editor-selection: #3a4a66;
  --editor-gutter: #5c6370;

  /* Agent brand color for a logo drawn as a mask (see AgentLogo). */
  --agent-qoder: #2adb5c;

  /* Commit graph lanes (repository view): at least 3:1 on the background (UI-C3). */
  --lane-0: #4f9cf9;
  --lane-1: #c678dd;
  --lane-2: #56b6c2;
  --lane-3: #e5c07b;
  --lane-4: #4cc38a;
  --lane-5: #ef8a5b;
  --lane-6: #9aa5ff;
  --lane-7: #f07fb2;
  /* Text drawn on a lane color (the node's initials). */
  --lane-on: #14161b;
}

/*
 * Terminal (xterm) palettes; xterm's theme is read from these tokens. They do not follow the app theme:
 * Preferences → General → Terminal colors picks one (agents paint parts of their screen in their own theme).
 */
.terminal-scheme-dark {
  --terminal-bg: #15171c;
  --terminal-fg: #d7dae0;
  --terminal-cursor: #d7dae0;
  --terminal-selection: #3a4a66;
  --ansi-black: #2b2f3a;
  --ansi-red: #ef5b5b;
  --ansi-green: #4cc38a;
  --ansi-yellow: #e5c07b;
  --ansi-blue: #4f9cf9;
  --ansi-magenta: #c678dd;
  --ansi-cyan: #56b6c2;
  --ansi-white: #d7dae0;
  --ansi-bright-black: #5c6370;
  --ansi-bright-red: #ff7b7b;
  --ansi-bright-green: #6fe0a8;
  --ansi-bright-yellow: #f2d58f;
  --ansi-bright-blue: #7ab6ff;
  --ansi-bright-magenta: #dd9aef;
  --ansi-bright-cyan: #7fd1db;
  --ansi-bright-white: #ffffff;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --color-bg: #f6f7f9;
    --color-bg-elevated: #ffffff;
    --color-border: #d9dce3;
    --color-border-strong: #858b98;
    --color-text: #1f2329;
    --color-text-muted: #636a78;
    /* State colors are also text (git letters, errors): at least 4.5:1 on both backgrounds. */
    --color-accent: #1a66d0;
    --color-attention: #9a5b00;
    --color-success: #167a4c;
    --color-danger: #c22f2f;
    --color-accent-fill: #1a66d0;
    --color-danger-fill: #c22f2f;
    --color-on-attention: #ffffff;

    --editor-bg: #ffffff;
    --editor-fg: #1f2329;
    --editor-line-highlight: #f2f4f8;
    --editor-selection: #b6d3fb;
    --editor-gutter: #8b91a0;

    --agent-qoder: #1fa84a;

    --lane-0: #1d6fe0;
    --lane-1: #a626a4;
    --lane-2: #0f8a9a;
    --lane-3: #a06a00;
    --lane-4: #1f8f58;
    --lane-5: #c2501f;
    --lane-6: #5a5fd6;
    --lane-7: #c0306f;
    --lane-on: #ffffff;
  }
}

.terminal-scheme-light {
  --terminal-bg: #ffffff;
  --terminal-fg: #1f2329;
  --terminal-cursor: #1f2329;
  --terminal-selection: #b6d3fb;
  --ansi-black: #1f2329;
  --ansi-red: #c9302c;
  --ansi-green: #1f8f58;
  --ansi-yellow: #a06a00;
  --ansi-blue: #1d6fe0;
  --ansi-magenta: #a626a4;
  --ansi-cyan: #0f8a9a;
  --ansi-white: #8b91a0;
  --ansi-bright-black: #4a5060;
  --ansi-bright-red: #e04646;
  --ansi-bright-green: #2bb673;
  --ansi-bright-yellow: #c28400;
  --ansi-bright-blue: #3b86f0;
  --ansi-bright-magenta: #c04bbd;
  --ansi-bright-cyan: #1fa6b8;
  --ansi-bright-white: #d9dce3;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font: 13px/1.4 var(--font-ui);
  overflow: hidden;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-body {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar-width, 260px) minmax(0, 1fr) var(--git-width, 280px);
  flex: 1;
  min-height: 0;
}

/* Pane dividers: a thin hit area over the pane border, highlighted on hover, focus and drag. */
.splitter {
  z-index: 5;
  flex: none;
  background: transparent;
  transition: background-color 0.1s ease 0.15s;
}

.splitter:hover,
.splitter:focus-visible,
body.resizing-vertical .splitter-vertical:active,
body.resizing-horizontal .splitter-horizontal:active {
  background: color-mix(in srgb, var(--color-accent) 55%, transparent);
  outline: none;
}

.splitter-vertical {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
}

.splitter-sidebar {
  left: calc(var(--sidebar-width, 260px) - 3px);
}

.splitter-git {
  right: calc(var(--git-width, 280px) - 3px);
}

.splitter-horizontal {
  position: relative;
  height: 6px;
  margin: -3px 0;
  cursor: row-resize;
}

/* While dragging, keep the resize cursor everywhere and stop text selection. */
body.resizing-vertical,
body.resizing-vertical * {
  cursor: col-resize !important;
  user-select: none;
}

body.resizing-horizontal,
body.resizing-horizontal * {
  cursor: row-resize !important;
  user-select: none;
}

.pane {
  background: var(--color-bg-elevated);
  border-right: 1px solid var(--color-border);
  min-width: 0;
  overflow: auto;
}

.git-panel {
  border-right: 0;
  border-left: 1px solid var(--color-border);
}

.workspace {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

.tab-strip {
  height: 34px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.workspace-empty {
  display: grid;
  flex: 1;
  place-items: center;
}

.workspace-welcome {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

/* The logo as a mask, so it takes the theme's text color (dark navy alone would vanish in dark mode). */
.app-logo {
  width: 112px;
  height: 112px;
  background: var(--color-text);
  opacity: 0.85;
  mask: url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201254%201254'%3e%3cg%20transform='translate(0.000000,1254.000000)%20scale(0.100000,-0.100000)'%20fill='currentColor'%20stroke='none'%3e%3cpath%20d='M6045%2011764%20c-578%20-36%20-1046%20-124%20-1540%20-289%20-680%20-226%20-1285%20-564%20-1840%20-1026%20-141%20-117%20-437%20-410%20-570%20-564%20-463%20-535%20-827%20-1176%20-1041%20-1834%20-97%20-297%20-185%20-711%20-219%20-1036%20-54%20-510%20-11%20-1095%20120%20-1619%2051%20-205%20135%20-476%20147%20-476%204%200%208%204%208%2010%200%2024%20233%20438%20372%20660%20l66%20105%20-24%20125%20c-111%20601%20-95%201150%2052%201740%2081%20328%20177%20586%20339%20915%20501%201020%201297%201794%202335%202275%20507%20234%201062%20383%201645%20442%20165%2016%20639%2016%20810%200%20953%20-92%201802%20-445%202528%20-1050%20123%20-102%20388%20-363%20497%20-487%20433%20-496%20786%20-1113%20977%20-1707%2027%20-82%2051%20-148%2055%20-148%2012%200%20192%20-82%20395%20-180%20102%20-50%20188%20-89%20189%20-87%206%206%20-57%20303%20-96%20452%20-469%201805%20-1812%203150%20-3604%203610%20-429%20110%20-831%20163%20-1286%20169%20-140%202%20-282%202%20-315%200z'/%3e%3cpath%20d='M3695%209909%20c5%20-8%2039%20-52%2075%20-99%20410%20-522%20640%20-1104%20640%20-1615%200%20-267%20-63%20-550%20-178%20-798%20l-45%20-98%20-101%20-56%20c-504%20-282%20-979%20-642%20-1430%20-1083%20-430%20-422%20-742%20-815%20-1047%20-1320%20-107%20-178%20-299%20-551%20-299%20-581%200%20-25%20161%20-342%20260%20-509%20341%20-581%20791%20-1108%201265%20-1481%2090%20-71%20216%20-161%20220%20-157%201%202%20-29%2057%20-68%20123%20-86%20147%20-176%20340%20-222%20479%20-56%20166%20-75%20273%20-82%20446%20-4%20134%20-2%20169%2017%20260%2027%20133%2068%20231%20143%20343%20328%20490%201184%20832%202127%20849%20l155%203%208%2055%20c71%20490%20246%20932%20511%201294%2070%2096%20196%20244%20209%20245%204%201%20-6%20-25%20-22%20-57%20-220%20-436%20-345%20-872%20-406%20-1417%20-14%20-123%20-18%20-142%20-37%20-155%20-150%20-103%20-448%20-360%20-638%20-550%20-507%20-508%20-861%20-1079%20-1069%20-1722%20-39%20-121%20-121%20-436%20-121%20-465%200%20-24%20370%20-185%20643%20-278%20861%20-297%201771%20-376%202623%20-230%20583%20101%201075%20254%201599%20497%20293%20136%20481%20242%20770%20434%20312%20207%20546%20397%20799%20649%20654%20650%201125%201459%201352%202320%2038%20145%2095%20405%2088%20405%20-2%200%20-83%20-59%20-180%20-131%20-96%20-72%20-250%20-182%20-341%20-243%20l-165%20-111%20-48%20-125%20c-245%20-640%20-682%20-1280%20-1192%20-1747%20-368%20-337%20-708%20-573%20-1123%20-781%20-894%20-446%20-1793%20-591%20-2722%20-436%20-367%2060%20-728%20177%20-991%20320%20l-82%2045%2045%2059%20c76%2099%20226%20260%20351%20377%20810%20758%201759%201199%203309%201537%20337%2073%20837%20164%201095%20198%20l95%2012%20110%2089%20c137%20110%20393%20330%20394%20338%201%203%20-68%2021%20-151%2039%20-84%2018%20-158%2038%20-164%2044%20-6%206%20-19%2067%20-28%20136%20-10%2069%20-19%20126%20-20%20128%20-2%201%20-61%20-18%20-132%20-44%20-140%20-49%20-326%20-114%20-331%20-114%20-2%200%20-34%2063%20-73%20140%20-39%2077%20-73%20140%20-77%20140%20-3%200%20-81%20-40%20-172%20-89%20l-166%20-89%20-95%2014%20c-52%207%20-174%2021%20-270%2030%20-96%209%20-177%2018%20-179%2019%20-2%202%2050%2030%20115%2063%20240%20119%20592%20247%20875%20317%20146%2036%20467%2095%20517%2095%2026%200%2030%20-7%2087%20-155%20l59%20-155%2055%2031%20c86%2049%20157%20100%20263%20188%20l96%2081%2070%200%20c38%200%2096%20-3%20129%20-6%20l59%20-6%2018%20-147%20c10%20-80%2020%20-160%2024%20-178%20l7%20-32%20121%2082%20c456%20310%20940%20742%201214%201082%2044%2055%2080%20102%2080%20105%200%2013%20-354%20209%20-600%20331%20-945%20471%20-1857%20780%20-2780%20944%20-389%2069%20-737%20109%20-1066%20121%20l-172%207%20-136%20143%20c-491%20514%20-1131%20961%20-1783%201243%20-520%20225%20-1044%20353%20-1512%20368%20-156%205%20-183%204%20-176%20-8z%20m5110%20-2908%20c94%20-17%20240%20-44%20325%20-61%20172%20-34%20756%20-177%20780%20-190%2011%20-7%20-24%20-28%20-130%20-78%20-318%20-153%20-412%20-176%20-549%20-133%20-73%2023%20-88%2033%20-301%20220%20-90%2079%20-200%20171%20-245%20204%20-44%2032%20-82%2061%20-84%2063%20-10%209%2043%202%20204%20-25z%20m-2201%20-457%20c-185%20-427%20-295%20-764%20-343%20-1049%20-39%20-235%20-46%20-326%20-46%20-625%200%20-316%2010%20-428%2061%20-674%2014%20-65%2023%20-120%2020%20-123%20-11%20-12%20-134%2067%20-184%20117%20-68%2069%20-134%20202%20-162%20325%20-27%20118%20-38%20403%20-21%20570%2033%20323%20121%20626%20270%20926%2088%20176%20149%20276%20266%20434%2076%20102%20187%20236%20192%20231%202%20-2%20-22%20-61%20-53%20-132z'/%3e%3c/g%3e%3c/svg%3e") center / contain no-repeat;
}

.pane-section {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
}

.pane-title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.placeholder {
  margin: 0;
  color: var(--color-text-muted);
}

.status-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  height: 24px;
  padding: 0 12px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  color: var(--color-text-muted);
  font-size: 12px;
}

.status-spacer {
  flex: 1;
}

/* ---- Projects & sessions ---- */
.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project {
  margin-top: 8px;
}

.project-row,
.session-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.project-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-list {
  margin: 2px 0 0;
  padding: 0 0 0 8px;
  list-style: none;
}

.session-row {
  border-radius: 4px;
}

.session-row.selected {
  background: color-mix(in srgb, var(--color-accent) 18%, transparent);
}

.session-select {
  display: flex;
  flex: 1;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 3px 4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.session-select.static {
  cursor: default;
  color: var(--color-text-muted);
}

.session-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.session-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Current tool (working) or last message (waiting, finished), one line. */
.session-detail {
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-chip {
  flex: none;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--color-bg-elevated);
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}

.usage-chip.warn {
  color: var(--color-attention);
  box-shadow: inset 0 0 0 1px var(--color-attention);
}

.session-agent {
  margin-left: auto;
}

.agent-logo {
  flex: none;
  width: 16px;
  height: 16px;
}

.agent-logo-mask {
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

/* Preferences → Agents */
.agent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}

.agent-toggle {
  align-items: center;
  color: var(--color-text);
  font-size: 13px;
}

.agent-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 22px;
}

.agent-status {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.agent-status.ready {
  color: var(--color-success);
}

.agent-status.missing,
.agent-status.broken {
  color: var(--color-attention);
}

.subheading {
  margin: 8px 0 0 8px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 500;
}

.icon-btn {
  display: inline-grid;
  flex: none;
  place-items: center;
  /* At least 24×24 (WCAG 2.5.8; UI-T1). */
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  background: color-mix(in srgb, var(--color-text) 12%, transparent);
  color: var(--color-text);
}

.state-badge {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  color: var(--color-text-muted);
}

.state-badge svg {
  display: block;
  width: 12px;
  height: 12px;
}

.state-starting,
.state-working {
  color: var(--color-accent);
}

.state-arc {
  transform-origin: 6px 6px;
  animation: spin 1.2s linear infinite;
}

.state-needs-attention {
  color: var(--color-attention);
}

.state-finished {
  color: var(--color-success);
}

.state-error {
  color: var(--color-danger);
}

/* An idle worktree (not a StateBadge): a plain hollow ring. */
.state-idle {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--color-text-muted);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .state-arc {
    animation: none;
  }
}

/* ---- Tabs & terminals ---- */
.tab-strip {
  display: flex;
  overflow-x: auto;
}

.tab {
  display: flex;
  flex: none;
  align-items: center;
  max-width: 220px;
  padding-right: 4px;
  border-right: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.tab.selected {
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

.tab-label {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 0 4px 0 12px;
  height: 34px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* One line, cut with "…": a wrapped title would be clipped by the fixed tab height. */
.tab-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-body {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
}

.terminal-view {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--terminal-bg);
}

.terminal-view[hidden] {
  display: none;
}

.terminal-host {
  position: absolute;
  inset: 6px 0 0 8px;
  /* A terminal mirroring another client's (larger) size can be scrolled. */
  overflow: auto;
}

.terminal-search {
  position: absolute;
  top: 6px;
  right: 18px;
  z-index: 5;
  display: flex;
  gap: 2px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-elevated);
}

/* ---- Dialogs & forms ---- */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 45%);
}

.dialog {
  width: min(460px, calc(100vw - 32px));
  /* Long dialogs (Settings) scroll instead of running off a short window. */
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-elevated);
  box-shadow: 0 12px 40px rgb(0 0 0 / 40%);
}

.dialog-title {
  margin: 0 0 8px;
  font-size: 15px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-hint,
.field-hint {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > span,
.field > legend {
  padding: 0;
  color: var(--color-text-muted);
  font-size: 12px;
}

/* A group's heading reads as a heading, not as one more field label (Preferences). */
fieldset.field > legend {
  margin-bottom: 4px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
}

.field-error,
.form-error {
  margin: 0;
  color: var(--color-danger);
  font-size: 12px;
}

.form-warning {
  margin: 0;
  padding: 6px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-attention) 18%, transparent);
  color: var(--color-text);
}

input:not([type='checkbox'], [type='radio']),
select {
  padding: 6px 8px;
  border: 1px solid var(--color-border-strong);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
}

/* Every focusable element shows the same ring (UI-F1). */
:is(input, select, textarea, button, a, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

/* Form fields are recognized by their border: 3:1 against the background (UI-C3). */
textarea:not(.xterm-helper-textarea, .inputarea) {
  border-color: var(--color-border-strong);
}

:is(input, textarea)[aria-invalid='true'] {
  border-color: var(--color-danger);
}

/* Checkboxes and radios: a 24 px target with their margin (WCAG 2.5.8 spacing; UI-T1). */
input:is([type='checkbox'], [type='radio']) {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 4px;
}

.checkbox {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--color-text-muted);
  font-size: 12px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segment {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
  justify-content: center;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
}

.segment.selected {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 16%, transparent);
}

.segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn {
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-primary {
  border-color: var(--color-accent-fill);
  background: var(--color-accent-fill);
  color: var(--color-on-accent);
}

.btn-danger {
  border-color: var(--color-danger-fill);
  background: var(--color-danger-fill);
  color: var(--color-on-danger);
}

.notice {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-top: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-attention) 22%, var(--color-bg-elevated));
}

.notice-info {
  background: color-mix(in srgb, var(--color-accent) 18%, var(--color-bg-elevated));
}

/* ---- Attention ---- */
.state-needs-attention {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-attention) 35%, transparent);
}

.status-attention {
  padding: 1px 8px;
  border: 0;
  border-radius: 10px;
  background: var(--color-attention);
  color: var(--color-on-attention);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.status-link {
  align-self: stretch;
  min-width: 24px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  cursor: pointer;
}

.status-link:hover {
  text-decoration-color: currentcolor;
}

.session-row[data-state='needs-attention'] .session-name,
.tab-label .state-needs-attention + span {
  font-weight: 600;
}

/* ---- Explorer ---- */
.sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-projects {
  flex: none;
  max-height: 45%;
  overflow: auto;
}

/* Sized by the user's divider; the explorer below always keeps 120px. */
.sidebar-projects.sized {
  height: min(var(--projects-height), calc(100% - 120px));
  max-height: none;
}

.explorer {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 120px;
  padding-bottom: 0;
  border-bottom: 0;
}

.file-tree {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 -12px;
  overflow: auto;
  outline: none;
}

.file-tree:focus-visible {
  box-shadow: inset 0 0 0 2px var(--color-accent);
}

.file-tree-canvas {
  position: relative;
  min-width: max-content;
}

.tree-row {
  position: absolute;
  right: 0;
  left: 0;
  display: flex;
  gap: 4px;
  align-items: center;
  padding-right: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.tree-row:hover {
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.tree-row.selected {
  background: color-mix(in srgb, var(--color-accent) 18%, transparent);
}

.tree-row.ignored {
  color: var(--color-text-muted);
  font-style: italic;
}

.tree-chevron {
  flex: none;
  width: 12px;
  color: var(--color-text-muted);
  text-align: center;
}

.tree-icon {
  flex: none;
  width: 16px;
  height: 16px;
}

.tree-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-status {
  flex: none;
  width: 14px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.tree-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-attention);
}

.status-M .tree-status,
.status-M .tree-name {
  color: var(--color-attention);
}

.status-A .tree-status,
.status-A .tree-name,
.status-U .tree-status,
.status-U .tree-name {
  color: var(--color-success);
}

.status-D .tree-status,
.status-D .tree-name {
  color: var(--color-danger);
  text-decoration: line-through;
}

.tree-empty {
  padding: 4px 12px;
}

/* ---- Editor ---- */
.file-tabs {
  height: 30px;
  background: var(--color-bg);
}

.file-tabs .tab-label {
  height: 30px;
}

.dirty-dot {
  color: var(--color-attention);
  font-size: 10px;
}

.editor-view {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  background: var(--editor-bg);
}

.editor-view[hidden] {
  display: none;
}

.editor-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 10px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 12px;
}

.editor-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-notice {
  color: var(--color-success);
}

.editor-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--color-attention) 22%, var(--color-bg-elevated));
}

.editor-banner-actions {
  display: flex;
  gap: 6px;
}

.editor-host {
  flex: 1;
  min-height: 0;
}

.editor-host[hidden] {
  display: none;
}

.editor-placeholder {
  display: grid;
  flex: 1;
  place-items: center;
}

.unsaved-list {
  margin: 0;
  padding-left: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---- Git panel ---- */
.git-panel {
  display: flex;
  flex-direction: column;
}

.git-branch {
  margin-bottom: 6px;
}

.git-branch-name {
  overflow: hidden;
  font-family: var(--font-mono);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.git-upstream {
  color: var(--color-text-muted);
  font-size: 12px;
}

.git-groups {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.git-group {
  padding: 4px 0 8px;
}

.git-group-title {
  margin: 0 12px 2px;
}

.git-count {
  padding: 0 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-text) 12%, transparent);
  font-size: 12px;
}

.git-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.git-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  padding: 2px 12px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.git-row:hover {
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.git-name {
  flex: none;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.git-dir {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.git-letter {
  flex: none;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
}

.git-row.status-M .git-letter {
  color: var(--color-attention);
}

.git-row.status-A .git-letter,
.git-row.status-U .git-letter {
  color: var(--color-success);
}

.git-row.status-D .git-letter,
.git-row.status-\! .git-letter {
  color: var(--color-danger);
}

/* ---- Diff view ---- */
.diff-view {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  background: var(--editor-bg);
}

.diff-view[hidden] {
  display: none;
}

.diff-note {
  color: var(--color-success);
  font-size: 12px;
}

.diff-note-deleted {
  color: var(--color-danger);
}

.segmented.compact {
  flex-wrap: nowrap;
  gap: 0;
}

.segmented.compact .segment {
  padding: 2px 10px;
  white-space: nowrap;
  font-size: 12px;
}

.segmented.compact .segment:first-child {
  border-radius: 4px 0 0 4px;
}

.segmented.compact .segment:last-child {
  border-radius: 0 4px 4px 0;
}

.branch-sync {
  font-weight: 600;
}

/* ---- Git actions: sync, banners, staging, commit box ---- */
.git-panel {
  overflow: hidden;
}

.git-sync {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.git-sync .btn {
  flex: 1;
  padding: 4px 8px;
  white-space: nowrap;
}

.git-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin: 0 12px 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.git-banner-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.git-banner-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.git-banner .btn {
  padding: 2px 10px;
}

.git-banner-operation {
  flex-direction: column;
  align-items: stretch;
  background: color-mix(in srgb, var(--color-attention) 22%, var(--color-bg-elevated));
}

.commit-blocked {
  flex: none;
  margin: 0;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--color-border);
}

.git-banner-error {
  background: color-mix(in srgb, var(--color-danger) 18%, var(--color-bg-elevated));
}

.git-banner-ok {
  background: color-mix(in srgb, var(--color-success) 16%, var(--color-bg-elevated));
}

.git-banner-details {
  flex-basis: 100%;
  color: var(--color-text-muted);
}

.git-banner-details pre {
  max-height: 140px;
  margin: 4px 0 0;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
}

.git-group-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin: 0 12px 2px;
}

.git-group-head .git-group-title {
  margin: 0;
}

.link-btn {
  min-height: 24px;
  padding: 2px 4px;
  border: 0;
  background: none;
  color: var(--color-accent);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.link-btn:disabled {
  color: var(--color-text-muted);
  cursor: default;
}

.git-item {
  display: flex;
  align-items: center;
}

.git-item .git-row {
  flex: 1;
  min-width: 0;
  padding-right: 4px;
}

.git-action {
  flex: none;
  margin-right: 4px;
}

.git-row.status-conflict .git-letter {
  color: var(--color-danger);
}

.commit-box {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 6px;
  max-height: 60%;
  padding: 8px 12px 10px;
  overflow: auto;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.commit-manual {
  font-size: 12px;
}

.commit-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.commit-row-top {
  align-items: flex-start;
}

.commit-row select,
.commit-row input,
.commit-row textarea {
  flex: 1;
  min-width: 0;
}

.commit-type {
  flex: none;
  width: 48px;
  color: var(--color-text-muted);
  font-size: 12px;
}

/* Monaco paints its text layer above the view zones; comment boxes have buttons and a textarea. */
.monaco-editor .view-zones {
  z-index: 5;
}

.review-zone {
  box-sizing: border-box;
  margin: 4px 12px 4px 48px;
  padding: 6px 8px;
  border: 1px solid var(--color-accent, var(--color-border));
  border-radius: 4px;
  background: var(--color-bg-elevated);
  color: var(--color-text);
  font: 12px/1.5 var(--font-ui);
  overflow: hidden;
}

.review-zone-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-zone-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  resize: none;
}

.review-zone-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.review-zone-note {
  margin-right: auto;
  color: var(--color-text-muted);
}

.review-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.review-glyph-add::before,
.review-glyph-comment::before {
  content: '+';
  display: block;
  text-align: center;
  font-weight: 700;
  line-height: 18px;
  color: var(--color-accent, var(--color-text-muted));
  cursor: pointer;
}

.review-glyph-comment::before {
  content: '●';
  font-size: 11px;
  cursor: default;
}

.form-textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 12px;
  resize: vertical;
}

.commit-textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  resize: vertical;
}

.commit-length {
  align-self: flex-end;
  color: var(--color-text-muted);
  font-size: 12px;
}

.commit-length.warn {
  color: var(--color-attention);
}

.commit-length.over {
  color: var(--color-danger);
  font-weight: 600;
}

.commit-hint {
  color: var(--color-text-muted);
}

.commit-length-hint {
  color: var(--color-text-muted);
}

.commit-issues {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}

.commit-error {
  color: var(--color-danger);
}

.commit-warning {
  color: var(--color-attention);
}

.commit-preview {
  max-height: 120px;
  margin: 0;
  padding: 6px 8px;
  overflow: auto;
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---- GitLab: settings and merge requests ---- */
.gitlab-actions {
  align-items: center;
}

.gitlab-feedback {
  margin: 0;
  font-size: 12px;
}

.gitlab-feedback.ok {
  color: var(--color-success);
}

.mr-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.mr-section .subheading {
  margin: 0 0 4px;
}

.mr-section .btn {
  width: 100%;
  padding: 4px 8px;
}

.mr-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.mr-title {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mr-iid {
  color: var(--color-text-muted);
  font-weight: 400;
}

.mr-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 12px;
}

/* Pipeline and merge readiness of the open merge request. */
.mr-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  font-size: 12px;
  color: var(--color-text-muted);
}

.mr-pipeline-success {
  color: var(--color-success);
}

.mr-pipeline-failed,
.mr-pipeline-canceled {
  color: var(--color-danger);
}

.mr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mr-badge {
  padding: 0 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-text) 12%, transparent);
}

.mr-state-opened {
  background: color-mix(in srgb, var(--color-success) 25%, transparent);
  color: var(--color-text);
}

.mr-state-merged {
  background: color-mix(in srgb, var(--color-accent) 25%, transparent);
  color: var(--color-text);
}

.mr-error {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  color: var(--color-danger);
  font-size: 12px;
}

/* Command palette (Ctrl/Cmd+Shift+P) */
.palette-backdrop {
  place-items: start center;
  padding-top: 14vh;
}

.palette {
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-elevated);
  box-shadow: 0 12px 40px rgb(0 0 0 / 40%);
}

.palette-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

/* The palette's input always has focus; its underline is the indicator (UI-F1). */
.palette-input:focus-visible {
  border-bottom-color: var(--color-accent);
  box-shadow: inset 0 -1px 0 var(--color-accent);
}

.palette-list {
  max-height: min(50vh, 380px);
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
}

.palette-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 5px;
  cursor: pointer;
}

.palette-item.active {
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
}

.palette-item.active .palette-shortcut,
.palette-item.active .palette-detail {
  color: var(--color-text);
}

.palette-detail {
  color: var(--color-text-muted);
  font-size: 12px;
}

.palette-shortcut {
  color: var(--color-text-muted);
  font: 12px var(--font-mono);
}

.palette-empty {
  padding: 10px;
  color: var(--color-text-muted);
}

/* Find in files: a wider palette with a case toggle and one row per matching line. */
.palette.find-in-files {
  width: min(820px, calc(100vw - 32px));
}

.find-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.find-row .palette-input {
  border-bottom: 0;
}

.find-case {
  flex-shrink: 0;
  padding-right: 12px;
  font-size: 12px;
}

.find-summary {
  padding: 4px 14px;
  color: var(--color-text-muted);
  font-size: 12px;
}

.find-text {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: pre;
}

.find-in-files .palette-detail {
  flex-shrink: 0;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Sidebar tabs: Explorer | Issues ---- */
.pane-tabs {
  display: flex;
  gap: 2px;
  margin: 0 0 6px;
}

.pane-tab {
  min-height: 24px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.pane-tab:hover {
  color: var(--color-text);
}

.pane-tab.selected {
  background: color-mix(in srgb, var(--color-text) 10%, transparent);
  color: var(--color-text);
}

/* ---- Jira issues ---- */
.issues {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.issues-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.issues-toolbar {
  display: flex;
  gap: 4px;
  align-items: center;
}

.issues-toolbar .issues-filter {
  flex: 1;
  min-width: 0;
  padding: 3px 6px;
}

.issues-error {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.issue-list {
  flex: 1;
  min-height: 0;
  margin: 0 -12px;
  padding: 0 4px 8px 8px;
  overflow: auto;
  list-style: none;
}

.issue-row {
  display: flex;
  gap: 2px;
  align-items: flex-start;
  border-radius: 4px;
}

.issue-row:hover {
  background: color-mix(in srgb, var(--color-text) 6%, transparent);
}

.issue-select {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.issue-line {
  display: flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
}

.issue-key {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.issue-status {
  overflow: hidden;
  padding: 0 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--color-text) 12%, transparent);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.issue-status.status-cat-indeterminate {
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
  color: var(--color-text);
}

.issue-status.status-cat-done {
  background: color-mix(in srgb, var(--color-success) 22%, transparent);
  color: var(--color-text);
}

.issue-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.issue-meta {
  color: var(--color-text-muted);
  font-size: 12px;
}

.issues-truncated {
  padding-bottom: 8px;
}

.jql-input {
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 12px;
  resize: vertical;
}

/* ---- Preferences window ---- */
.preferences {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  height: 100%;
}

.preferences-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 8px;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.preferences-tab {
  padding: 6px 10px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.preferences-tab:hover {
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.preferences-tab.selected {
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
  font-weight: 600;
}

.preferences-content {
  overflow-y: auto;
  padding: 16px 24px 24px;
}

.preferences-content .form {
  max-width: 560px;
}

.preferences-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.preferences .notice {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 196px;
}

/* ---- Preferences: ntfy topic row ---- */
.ntfy-topic {
  display: flex;
  gap: 6px;
}

.ntfy-topic input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
}

/* QR code to subscribe from the ntfy app */
.ntfy-qr {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin-top: 8px;
}

.qr-code {
  flex: none;
  width: 196px;
  height: 196px;
  border-radius: 4px;
}

.qr-code-light {
  fill: var(--qr-light);
}

.qr-code-dark {
  fill: var(--qr-dark);
}

.ntfy-qr-text {
  flex: 1;
  min-width: 200px;
}

.ntfy-qr-link {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
  user-select: text;
}

/* ---- Scheduled tasks ---- */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.task-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.task-name {
  font-weight: 600;
}

.task-detail {
  color: var(--color-text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.task-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
}

.interval-picker {
  display: flex;
  gap: 6px;
}

.interval-picker input {
  width: 6em;
}

/* Preferences → Remote access */
.remote-urls {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.remote-urls li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remote-urls code {
  font-family: var(--font-mono);
  user-select: all;
}

.remote-clients {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 4px 0 8px;
}

.remote-clients th,
.remote-clients td {
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.remote-clients th {
  color: var(--color-text-muted);
  font-weight: 500;
}

.remote-clients tr[data-connected='true'] td:last-child {
  color: var(--color-success);
}

.remote-addresses td:nth-child(2) {
  color: var(--color-attention);
}

.remote-addresses td:last-child {
  text-align: right;
}

.remote-block-row {
  display: flex;
  gap: 6px;
}

.remote-block-row input {
  flex: 1;
  min-width: 0;
}

.remote-http-warning {
  color: var(--color-attention);
}

.remote-fingerprint {
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  user-select: all;
}

/* ---- About window ---- */
.about {
  box-sizing: border-box;
  height: 100%;
  overflow-y: auto;
  padding: 20px 24px 24px;
}

.about-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.about-logo {
  flex: none;
  width: 64px;
  height: 64px;
}

.about-name {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.about-tagline,
.about-version {
  margin: 2px 0 0;
}

.about-version {
  color: var(--color-text-muted);
}

.about-section {
  margin-top: 16px;
}

.about-section h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.about-section p {
  margin: 0 0 4px;
}

.about-changelog-notes h3 {
  margin: 8px 0 2px;
  font-size: 12px;
  font-weight: 600;
}

.about-changelog-notes ul {
  margin: 0;
  padding-left: 20px;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

a.btn {
  text-decoration: none;
}

.about-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 16px;
  margin: 0 0 6px;
}

.about-facts > div {
  display: contents;
}

.about-facts dt {
  color: var(--color-text-muted);
}

.about-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.about-filter {
  flex: 1;
  min-width: 160px;
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
}

.about-packages {
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  list-style: none;
}

.about-packages > li + li {
  border-top: 1px solid var(--color-border);
}

.about-packages summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(80px, auto);
  gap: 12px;
  padding: 4px 8px;
  cursor: pointer;
}

.about-package-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.about-package-version,
.about-package-license {
  color: var(--color-text-muted);
}

.about-package-body {
  padding: 0 8px 8px;
}

.about-license-text {
  max-height: 260px;
  margin: 6px 0 0;
  padding: 8px;
  overflow: auto;
  border-radius: 4px;
  background: var(--color-bg-elevated);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
}

.about-trademarks {
  margin-top: 20px;
}

.about-package-body a {
  color: var(--color-accent);
  overflow-wrap: anywhere;
}

.about-changelog {
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.about-changelog summary {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 2px 0;
  cursor: pointer;
}

.about-changelog-version {
  font-weight: 600;
}

.about-changelog-date {
  color: var(--color-text-muted);
}

.about-changelog-badge {
  padding: 0 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
  font-size: 12px;
}

.about-changelog-notes {
  padding: 0 0 6px 16px;
}

/* A flex or grid <summary> loses its marker: draw one that turns when the row is open. */
.about-changelog summary,
.about-packages summary {
  list-style: none;
}

.about-changelog summary::-webkit-details-marker,
.about-packages summary::-webkit-details-marker {
  display: none;
}

.about-changelog summary::before,
.about-packages summary::before {
  content: '▸';
  display: inline-block;
  width: 10px;
  color: var(--color-text-muted);
  transition: transform 0.1s;
}

.about-changelog details[open] > summary::before,
.about-packages details[open] > summary::before {
  transform: rotate(90deg);
}

/* ---- Reduced motion and forced colors (UI-M1, UI-C5) ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/*
 * Windows contrast themes drop backgrounds and box-shadows: what they carried (state badges, the
 * selected tab, the attention halo, selected rows) gets a border or outline in system colors.
 */
@media (forced-colors: active) {
  .state-idle {
    border: 1.5px solid CanvasText;
  }

  .state-needs-attention {
    outline: 2px solid Highlight;
    outline-offset: 1px;
  }

  .tab.selected,
  .pane-tab.selected,
  .segment.selected,
  .palette-item.active,
  .tree-row.selected,
  .session-row.selected {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }

  .splitter:focus-visible,
  .file-tree:focus-visible {
    outline: 2px solid Highlight;
  }
}

/* Read by screen readers, not shown (live regions, spelled-out abbreviations). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Context menu (UI-D2) ---- */
.context-menu {
  position: fixed;
  z-index: 100;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  max-width: min(420px, calc(100vw - 8px));
  padding: 4px;
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  background: var(--color-bg-elevated);
  box-shadow: 0 8px 24px rgb(0 0 0 / 35%);
}

.context-menu-item {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.context-menu-item:hover,
.context-menu-item:focus-visible {
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
  outline: none;
}

.context-menu-item.danger {
  color: var(--color-danger);
}

.context-menu-item:disabled {
  color: var(--color-text-muted);
  cursor: default;
}

.context-menu-shortcut {
  color: var(--color-text-muted);
  font: 12px var(--font-mono);
}

.context-menu-item:hover .context-menu-shortcut,
.context-menu-item:focus-visible .context-menu-shortcut {
  color: var(--color-text);
}

/* ---- Keyboard shortcuts reference (UI-D3) ---- */
.shortcuts {
  display: grid;
  gap: 16px;
  max-height: min(65vh, 560px);
  overflow-y: auto;
}

.shortcuts-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
}

.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
}

.shortcuts-table td {
  padding: 4px 0;
  border-top: 1px solid var(--color-border);
  vertical-align: top;
}

.shortcuts-table td:first-child {
  width: 45%;
  padding-right: 12px;
}

.shortcuts-table kbd {
  font: 12px var(--font-mono);
  white-space: nowrap;
}

@media (forced-colors: active) {
  .context-menu-item:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}

.status-problem {
  color: var(--color-danger);
  font-weight: 600;
}

.workspace-welcome kbd {
  margin-left: 8px;
  font: 12px var(--font-mono);
  opacity: 1;
}

/* A link inside a sentence keeps the text's spacing (inline targets are exempt from WCAG 2.5.8). */
p > .link-btn {
  min-height: 0;
  padding: 0;
}

/* ---- Preferences → Git hosting ---- */
.hosting-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}

.hosting-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.hosting-list li.selected {
  border-color: var(--color-accent);
}

.hosting-list .hosting-name {
  font-weight: 600;
}

.hosting-list .form-hint {
  grid-column: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hosting-list .btn {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.hosting-form {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.link-btn.danger {
  color: var(--color-danger);
}

/* ---- Clone dialog (Phase 21c) ---- */
.dialog:has(.clone-dialog) {
  width: min(620px, calc(100vw - 32px));
}

.clone-repos {
  display: flex;
  flex-direction: column;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
}

.clone-repos > .placeholder,
.clone-repos > .form-error {
  margin: 10px;
}

.clone-repo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 32px;
  padding: 5px 10px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.clone-repo:hover {
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.clone-repo.selected {
  background: color-mix(in srgb, var(--color-accent) 18%, transparent);
  box-shadow: inset 3px 0 0 var(--color-accent);
}

.clone-repo-name {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 500;
}

.clone-repo-name .chip {
  padding: 0 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-text) 12%, transparent);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 400;
}

.clone-repo-desc {
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clone-folder-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.clone-folder-path {
  flex: 1;
  /* Long paths lose their start, not the folder at the end. */
  direction: rtl;
  text-align: left;
  min-width: 0;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clone-target {
  overflow-wrap: anywhere;
}

.clone-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.clone-progress progress {
  width: 100%;
}

.clone-failure p {
  margin: 0;
}

.clone-detail {
  max-height: 160px;
  margin: 4px 0 0;
  overflow: auto;
  color: var(--color-text);
  font: 11px/1.4 var(--font-mono);
  white-space: pre-wrap;
}

.clone-folder-setting {
  margin-top: 12px;
}

/* New repository and publish (Phase 21d) */
.new-repo-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 0;
  padding: 8px 10px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.new-repo-files legend {
  padding: 0 4px;
  color: var(--color-text-muted);
}

.remote-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 22px;
}

.new-repo-address {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clone-detail-text {
  white-space: pre-wrap;
}

/* Issues from GitHub, GitLab and Jira (Phase 21e) */
.issues-source {
  flex: 1;
  min-width: 0;
}

.issues {
  min-width: 0;
}

.issues-filters {
  flex-wrap: wrap;
  justify-content: space-between;
  min-width: 0;
}

.issues-filters .segment {
  flex: none;
}

.issues-mine {
  font-size: 12px;
  white-space: nowrap;
}

.issues-failure {
  margin: 0;
  font-size: 12px;
}

.dialog:has(.issue-dialog) {
  width: min(960px, calc(100vw - 32px));
}

.dialog:has(.new-issue-dialog) {
  width: min(680px, calc(100vw - 32px));
}

.issue-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.issue-byline {
  color: var(--color-text-muted);
}

.issue-head-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.issue-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 20px;
}

@media (width < 720px) {
  .issue-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

.issue-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.issue-main > .subheading {
  margin: 12px 0 0;
}

.issue-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.issue-state-actions,
.issue-transition {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.issue-transition-row {
  display: flex;
  gap: 6px;
}

.issue-transition-row > :first-child {
  flex: 1;
  min-width: 0;
}

.issue-comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.issue-comment {
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.issue-comment-head {
  margin-bottom: 4px;
  color: var(--color-text-muted);
  font-size: 12px;
}

.issue-comment-head strong {
  color: var(--color-text);
}

.issue-comment-form textarea,
.new-issue-dialog textarea {
  width: 100%;
  resize: vertical;
}

.issue-labels {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 0;
  padding: 6px 8px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.issue-labels legend {
  padding: 0 4px;
  color: var(--color-text-muted);
}

.issue-label-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.issue-label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  font-size: 12px;
}

.issue-label-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
}

.issue-checklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 180px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.issue-checklist-wide {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.new-issue-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.field-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Markdown from issue trackers (rendered as elements, never as HTML) */
.markdown {
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.markdown > :first-child {
  margin-top: 0;
}

.markdown p,
.markdown ul,
.markdown ol,
.markdown blockquote,
.markdown pre,
.markdown-table {
  margin: 0 0 8px;
}

.markdown ul,
.markdown ol {
  padding-left: 22px;
}

.markdown li.task-item {
  list-style: none;
}

.markdown li.task-item > input {
  margin: 0 6px 0 -18px;
}

.markdown li > p {
  margin: 0;
}

.markdown .markdown-heading {
  margin: 12px 0 6px;
  font-size: 14px;
}

.markdown blockquote {
  padding-left: 10px;
  border-left: 3px solid var(--color-border-strong);
  color: var(--color-text-muted);
}

.markdown code {
  padding: 0 3px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--color-text) 10%, transparent);
  font-family: var(--font-mono);
  font-size: 12px;
}

.markdown pre {
  padding: 8px;
  overflow-x: auto;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.markdown pre code {
  padding: 0;
  background: none;
}

.markdown a {
  color: var(--color-accent);
}

.markdown-table {
  overflow-x: auto;
}

.markdown table {
  border-collapse: collapse;
}

.markdown th,
.markdown td {
  padding: 3px 8px;
  border: 1px solid var(--color-border);
  text-align: left;
}
/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */

/**
 *  Default styles for xterm.js
 */

.xterm {
    cursor: text;
    position: relative;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
}

.xterm.focus,
.xterm:focus {
    outline: none;
}

.xterm .xterm-helpers {
    position: absolute;
    top: 0;
    /**
     * The z-index of the helpers must be higher than the canvases in order for
     * IMEs to appear on top.
     */
    z-index: 5;
}

.xterm .xterm-helper-textarea {
    padding: 0;
    border: 0;
    margin: 0;
    /* Move textarea out of the screen to the far left, so that the cursor is not visible */
    position: absolute;
    opacity: 0;
    left: -9999em;
    top: 0;
    width: 0;
    height: 0;
    z-index: -5;
    /** Prevent wrapping so the IME appears against the textarea at the correct position */
    white-space: nowrap;
    overflow: hidden;
    resize: none;
}

.xterm .composition-view {
    /* TODO: Composition position got messed up somewhere */
    background: #000;
    color: #FFF;
    display: none;
    position: absolute;
    white-space: nowrap;
    z-index: 1;
}

.xterm .composition-view.active {
    display: block;
}

.xterm .xterm-viewport {
    /* On OS X this is required in order for the scroll bar to appear fully opaque */
    background-color: #000;
    overflow-y: scroll;
    cursor: default;
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
}

.xterm .xterm-screen {
    position: relative;
}

.xterm .xterm-screen canvas {
    position: absolute;
    left: 0;
    top: 0;
}

.xterm-char-measure-element {
    display: inline-block;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: -9999em;
    line-height: normal;
}

.xterm.enable-mouse-events {
    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
    cursor: default;
}

.xterm.xterm-cursor-pointer,
.xterm .xterm-cursor-pointer {
    cursor: pointer;
}

.xterm.column-select.focus {
    /* Column selection mode */
    cursor: crosshair;
}

.xterm .xterm-accessibility:not(.debug),
.xterm .xterm-message {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 10;
    color: transparent;
    pointer-events: none;
}

.xterm .xterm-accessibility-tree:not(.debug) *::selection {
  color: transparent;
}

.xterm .xterm-accessibility-tree {
  font-family: monospace;
  user-select: text;
  white-space: pre;
}

.xterm .xterm-accessibility-tree > div {
  transform-origin: left;
  width: fit-content;
}

.xterm .live-region {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.xterm-dim {
    /* Dim should not apply to background, so the opacity of the foreground color is applied
     * explicitly in the generated class and reset to 1 here */
    opacity: 1 !important;
}

.xterm-underline-1 { text-decoration: underline; }
.xterm-underline-2 { text-decoration: double underline; }
.xterm-underline-3 { text-decoration: wavy underline; }
.xterm-underline-4 { text-decoration: dotted underline; }
.xterm-underline-5 { text-decoration: dashed underline; }

.xterm-overline {
    text-decoration: overline;
}

.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }

.xterm-strikethrough {
    text-decoration: line-through;
}

.xterm-screen .xterm-decoration-container .xterm-decoration {
	z-index: 6;
	position: absolute;
}

.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
	z-index: 7;
}

.xterm-decoration-overview-ruler {
    z-index: 8;
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
}

.xterm-decoration-top {
    z-index: 2;
    position: relative;
}



/* Derived from vs/base/browser/ui/scrollbar/media/scrollbar.css */

/* xterm.js customization: Override xterm's cursor style */
.xterm .xterm-scrollable-element > .scrollbar {
    cursor: default;
}

/* Arrows */
.xterm .xterm-scrollable-element > .scrollbar > .scra {
	cursor: pointer;
	font-size: 11px !important;
}

.xterm .xterm-scrollable-element > .visible {
	opacity: 1;

	/* Background rule added for IE9 - to allow clicks on dom node */
	background:rgba(0,0,0,0);

	transition: opacity 100ms linear;
	/* In front of peek view */
	z-index: 11;
}
.xterm .xterm-scrollable-element > .invisible {
	opacity: 0;
	pointer-events: none;
}
.xterm .xterm-scrollable-element > .invisible.fade {
	transition: opacity 800ms linear;
}

/* Scrollable Content Inset Shadow */
.xterm .xterm-scrollable-element > .shadow {
	position: absolute;
	display: none;
}
.xterm .xterm-scrollable-element > .shadow.top {
	display: block;
	top: 0;
	left: 3px;
	height: 3px;
	width: 100%;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.left {
	display: block;
	top: 3px;
	left: 0;
	height: 100%;
	width: 3px;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.top-left-corner {
	display: block;
	top: 0;
	left: 0;
	height: 3px;
	width: 3px;
}
.xterm .xterm-scrollable-element > .shadow.top.left {
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
