:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #171717;
  background: #f7f7f7;
  font-synthesis: none;
  --background: #f7f7f7;
  --workspace: #f2f2f2;
  --surface: #ffffff;
  --surface-subtle: #fafafa;
  --foreground: #171717;
  --muted: #737373;
  --muted-strong: #575757;
  --home-link: #0969da;
  --border: #dedede;
  --border-soft: #e9e9e9;
  --focus: rgba(23, 23, 23, 0.16);
  --green: #18a46c;
  --green-bright: #07c480;
  --green-bg: rgba(7, 196, 128, 0.12);
  --red: #ed3047;
  --warning: #7a5b00;
  --red-bright: #ff6762;
  --red-bg: rgba(255, 103, 98, 0.13);
  --add: #e9f8f1;
  --add-strong: #b9ebd5;
  --del: #fff0ef;
  --del-strong: #ffc9c5;
  --code-foreground: #54545a;
  /* VSCode Light+ (including light_vs.json), with the MoonBit TextMate scopes.
     https://github.com/microsoft/vscode/tree/main/extensions/theme-defaults/themes */
  --syntax-keyword: #0000ff;
  --syntax-control: #af00db;
  --syntax-function: #795e26;
  --syntax-type: #267f99;
  --syntax-variable: #001080;
  --syntax-number: #098658;
  --syntax-string: #a31515;
  --syntax-escape: #ee0000;
  --syntax-comment: #008000;
  --syntax-operator: #000000;
  --syntax-interpolation: #000000;
  --syntax-attribute-parameter: #800000;
  --hunk: #f3f3f3;
  --empty-stripe: #e4e4e4;
  --toolbar-height: 3rem;
  --toolbar-inset: var(--toolbar-height);
  --change-title-height: 0px;
  --file-heading-inset: var(--file-heading-height);
  --file-heading-height: max(2.75rem, calc(2.7rem + 1px));
  --file-tree-preferred-width: 240px;
  --file-tree-resizer-width: 8px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.shell.dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.home-session-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 60vh;
  color: var(--muted-strong);
}

/* Signed-in homepage */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.home-identity {
  min-width: 0;
}

.home-header h1 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -.04em;
}

.account-control {
  min-width: 0;
}

.home-header .account-control {
  max-width: 45%;
}

button.account-button {
  max-width: 100%;
  min-height: 2.5rem;
}

.account-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-menu.account-menu {
  width: 290px;
  font-size: .85rem;
  overflow-wrap: anywhere;
}

.account-identity {
  margin: 0;
  padding: .75rem .5rem;
  border-bottom: 1px solid var(--border-soft);
}

.account-hint {
  margin: 0;
  padding: .15rem .5rem .75rem;
  color: var(--muted-strong);
  font-size: .78rem;
  line-height: 1.5;
}

.home-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  padding-top: .5rem;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

button.home-tab {
  min-width: 0;
  min-height: 3rem;
  justify-content: center;
  gap: .55rem;
  flex-wrap: wrap;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: .4rem .4rem 0 0;
  padding: .65rem .9rem;
  background: transparent;
  box-shadow: none;
  white-space: normal;
  font-size: 1rem;
  line-height: 1.35;
  text-align: center;
  color: var(--muted-strong);
}

button.home-tab[aria-selected="true"] {
  color: var(--foreground);
  border-bottom-color: var(--foreground);
}

button.home-tab:hover {
  background: var(--surface);
}

button.home-tab:active {
  transform: none;
}

.home-tab-count {
  border-radius: 1rem;
  padding: .1rem .45rem;
  font-size: .75rem;
  background: var(--border-soft);
  overflow-wrap: anywhere;
}

.home-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 0;
}

.home-updated {
  color: var(--muted-strong);
  font-size: .75rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.home-toolbar button {
  flex-shrink: 0;
  min-height: 2.25rem;
}

.home-toolbar button:disabled {
  cursor: default;
  opacity: .6;
}

.home-group {
  margin: 0 0 2rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: var(--surface);
}

.home-group:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.home-count {
  margin: 0;
  color: var(--muted-strong);
  font-size: .8rem;
  line-height: 1.5;
}

.home-pulls, .home-commits {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-pull + .home-pull {
  border-top: 1px solid var(--border-soft);
}

.home-pull-heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
}

button.home-expand {
  flex-shrink: 0;
  min-height: 2.25rem;
  padding: .35rem .5rem;
  font-weight: 500;
  border-color: transparent;
  box-shadow: none;
  background: transparent;
  color: var(--muted-strong);
}

.home-pull-info {
  min-width: 0;
  flex: 1;
}

.home-title-link {
  color: var(--home-link);
  font-size: .97rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.home-title-link:hover, .home-title-link:focus-visible, .home-commit-link:hover, .home-commit-link:focus-visible {
  text-decoration: underline;
}

.home-draft {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: .05rem .45rem;
  color: var(--muted-strong);
  font-size: .72rem;
}

.home-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .8rem;
  color: var(--muted-strong);
  font-size: .78rem;
  line-height: 1.6;
  margin-top: .35rem;
  overflow-wrap: anywhere;
}

.home-meta > * {
  min-width: 0;
}

.home-repository {
  font-weight: 500;
}

.home-commit-panel {
  border-top: 1px solid var(--border-soft);
  background: var(--surface-subtle);
  padding: .25rem 1.25rem .25rem 2rem;
}

.home-commit {
  padding: .7rem 0;
  border-bottom: 1px solid var(--border-soft);
}

.home-commit:last-child {
  border-bottom: 0;
}

.home-commit-link {
  color: var(--home-link);
  font-size: .85rem;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.home-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .9rem 1.25rem;
}

.home-page-actions:empty {
  display: none;
}

.home-commit-panel .home-page-actions {
  padding: .75rem 0;
}

.home-loading {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .85rem;
  color: var(--muted-strong);
}

.home-error {
  flex-basis: 100%;
}

.home-error p {
  margin: 0 0 .65rem;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--red);
  overflow-wrap: anywhere;
}

.home-empty {
  padding: 1rem 1.25rem 1.75rem;
  color: var(--muted-strong);
  font-size: .9rem;
  line-height: 1.6;
}

.home-empty p {
  margin: 0 0 .8rem;
}

.home-empty-title {
  color: var(--foreground);
  font-weight: 600;
}

@media (max-width: 600px) {
  .shell.dashboard {
    padding: 1.25rem .75rem 2rem;
  }
  .home-header {
    gap: .5rem;
    margin-bottom: 1.25rem;
  }
  .home-header h1 {
    font-size: 1.35rem;
  }
  .home-header .account-control {
    max-width: 40%;
  }
  .home-tabs {
    gap: .25rem;
  }
  button.home-tab {
    padding: .6rem .4rem;
    gap: .4rem;
    font-size: .9rem;
  }
  .home-toolbar {
    gap: .5rem;
  }
  .home-pull-heading {
    flex-direction: column;
    padding: 1rem .75rem;
    gap: .5rem;
  }
  button.home-expand {
    min-height: 2.5rem;
  }
  .home-commit-panel {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .home-page-actions, .home-empty {
    padding-left: .75rem;
    padding-right: .75rem;
  }

}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-width: 320px;
  min-height: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 0.17em;
}

a:hover {
  text-decoration-color: currentColor;
}

button,
input {
  font: inherit;
}

button,
a.range-apply,
.device-open {
  box-sizing: border-box;
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--foreground);
  border-radius: 0.42rem;
  padding: 0.45rem 0.72rem;
  color: var(--surface);
  background: var(--foreground);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

button:hover,
a.range-apply:hover,
.device-open:hover {
  border-color: #353535;
  background: #353535;
}

button:active,
a.range-apply:active,
.device-open:active {
  transform: translateY(1px);
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

button.secondary,
a.range-apply,
.device-open {
  border-color: var(--border);
  color: var(--foreground);
  background: var(--surface);
}

button.secondary:hover,
a.range-apply:hover,
.device-open:hover {
  border-color: #bcbcbc;
  background: var(--surface-subtle);
}

button.compact {
  min-height: 1.8rem;
  padding: 0.38rem 0.6rem;
  font-size: 0.76rem;
}

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

.shell {
  width: 100%;
  min-width: 0;
  min-height: 100svh;
}

.landing {
  display: flex;
  max-width: 43rem;
  margin: 0 auto;
  padding: clamp(2rem, 9vh, 5rem) 1.5rem 2rem;
  flex-direction: column;
  justify-content: center;
}

.workspace {
  padding: 0;
  background: var(--workspace);
}

.hero {
  min-width: 0;
}

.hero-landing {
  width: 100%;
}

.hero-workspace {
  display: grid;
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: var(--toolbar-height);
  grid-template-areas: "brand form actions account";
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.7rem;
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.7rem;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(16px);
}

.hero-copy,
.hero-controls {
  min-width: 0;
}

.hero-workspace .hero-copy {
  grid-area: brand;
}

.hero-workspace .hero-controls {
  grid-area: form;
}

.hero-workspace .workspace-actions {
  grid-area: actions;
}

.hero-workspace .account-control {
  grid-area: account;
  justify-self: end;
  align-self: center;
  margin-inline-start: .5rem;
  max-width: min(12rem, 25vw);
}

.hero-workspace .account-button {
  min-height: 2rem;
  padding: .38rem .6rem;
  font-size: .875rem;
}

.hero-landing .account-control {
  margin-top: 1rem;
}

.brand {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 0.42rem;
  color: var(--foreground);
  font-size: 1.52rem;
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1;
}

.brand-mark {
  display: grid;
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  border-radius: 0.4rem;
  color: var(--surface);
  background: var(--foreground);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.15em;
}

.mark-plus {
  align-self: start;
  margin-top: 0.16rem;
}

.mark-minus {
  align-self: end;
  margin-bottom: 0.17rem;
}

.brand-suffix {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 520;
  letter-spacing: -0.01em;
}

.hero-workspace .brand {
  gap: 0.38rem;
  font-size: 0.88rem;
  font-weight: 640;
  letter-spacing: -0.025em;
}

.hero-workspace .brand-suffix {
  display: none;
}

.lede {
  max-width: 41rem;
  margin: 1.05rem 0 0;
  color: var(--muted);
  font-size: 0.99rem;
  line-height: 1.52;
  text-wrap: pretty;
}

.route-example {
  display: flex;
  margin: 1.05rem 0 1.45rem;
  flex-direction: column;
  gap: 0.16rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.48rem;
  letter-spacing: -0.025em;
}

.route-example code {
  display: flex;
  min-width: 0;
  align-items: center;
  overflow: hidden;
  border-left: 3px solid;
  border-radius: 0.24rem 0 0 0.24rem;
  font: inherit;
  white-space: nowrap;
}

.route-example code > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-old {
  border-left-color: var(--red-bright) !important;
}

.route-new {
  border-left-color: var(--green-bright) !important;
}

.route-prefix {
  display: inline-flex;
  margin-right: 0.16rem;
  padding: 0.05rem 0.42rem;
  border-radius: 0 0.22rem 0.22rem 0;
}

.route-old .route-prefix {
  color: var(--red);
  background: var(--red-bg);
}

.route-new .route-prefix {
  color: var(--green);
  background: var(--green-bg);
}

.input-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.62rem;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
}

.hero-landing .input-panel {
  border-radius: 0.62rem 0.62rem 0 0;
}

.hero-landing .auth-controls {
  justify-content: flex-start;
  margin-top: 1rem;
}

.commit-form {
  min-width: 0;
}

.input-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.4rem 0.34rem 0.88rem;
}

.input-row input {
  width: 100%;
  min-width: 0;
  height: 2.55rem;
  border: 0;
  padding: 0;
  color: var(--foreground);
  background: transparent;
  font-size: 0.96rem;
  outline: none;
}

.input-row input::placeholder {
  color: #919191;
}

.input-row input:focus-visible {
  outline: 0;
}

.input-panel:focus-within {
  border-color: #b8b8b8;
  box-shadow: 0 0 0 3px var(--focus);
}

.workspace-url {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: text;
  color: var(--muted-strong);
  font-size: 0.8rem;
  line-height: 2rem;
}

.submit-button {
  min-height: 2.25rem;
  padding-inline: 0.8rem;
}

.submit-arrow {
  font-size: 1rem;
  line-height: 0;
}

.workspace-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.12rem;
}

.file-tree-trigger {
  display: none !important;
}

.file-tree-trigger-icon {
  position: relative;
  width: 0.88rem;
  height: 0.72rem;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}

.file-tree-trigger-icon::after {
  content: "";
  position: absolute;
  top: 0.27rem;
  right: 0;
  left: 0;
  border-top: 1.5px solid currentColor;
}

.file-tree-trigger-count {
  font-family: var(--mono);
  font-size: 0.62rem;
}

.toolbar-button,
a.toolbar-button,
button.toolbar-button {
  display: inline-flex;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border: 0;
  border-radius: 0.38rem;
  padding: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 0.75rem;
  font-weight: 520;
  line-height: 1;
  text-decoration: none;
}

.toolbar-button:hover,
a.toolbar-button:hover,
button.toolbar-button:hover {
  border-color: transparent;
  color: var(--foreground);
  background: var(--surface-subtle);
}

.toolbar-button:active,
button.toolbar-button:active {
  transform: none;
}

.display-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 0.375rem;
}

.filter-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 0.12rem;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  border: 1px solid var(--border);
  border-radius: 0.42rem;
}

button.segmented-option {
  height: 2rem;
  min-height: 2rem;
  border: 0;
  border-radius: 0.38rem;
  box-shadow: none;
  font-size: 0.75rem;
  font-weight: 400;
}

button.segmented-option.active {
  font-weight: 700;
}

button.segmented-option:active {
  transform: none;
}

.toolbar-filter {
  display: inline-flex;
  height: 2rem;
  align-items: center;
  gap: 0.42rem;
  border-radius: 0.38rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 520;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.toolbar-filter input {
  flex: 0 0 auto;
  width: 0.875rem;
  height: 0.875rem;
  margin: 0;
  accent-color: #2a55cc;
  cursor: pointer;
}

.public-note {
  display: flex;
  margin-top: -1px;
  align-items: flex-start;
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-top-color: var(--border-soft);
  border-radius: 0 0 0.62rem 0.62rem;
  padding: 0.72rem 0.88rem;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.78rem;
  line-height: 1.4;
}

.public-note p {
  margin: 0;
}

.note-dot {
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.28rem;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--green) 60%, var(--border));
  border-radius: 50%;
  background: var(--green-bg);
  box-shadow: inset 0 0 0 1px var(--surface);
}

.supported-links {
  margin-top: 1.65rem;
}

.supported-links h2 {
  margin: 0 0 0.48rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 450;
}

.supported-links ul {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 0.32rem;
  list-style: none;
}

.supported-links li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.82rem;
}

.supported-links code {
  min-width: 0;
  overflow: hidden;
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-arrow {
  flex: 0 0 auto;
  color: var(--muted);
}

.supported-links p {
  margin: 1.05rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.results,
.empty-state {
  margin-top: 0.65rem;
}

.workspace .results {
  margin-top: 0;
}

.results.selector-only {
  max-width: 56rem;
  margin-inline: auto;
}

.change-layout {
  --file-tree-width: clamp(240px, var(--file-tree-preferred-width), min(640px, 50vw));
  display: grid;
  min-width: 0;
  grid-template-columns: var(--file-tree-width) var(--file-tree-resizer-width) minmax(0, 1fr);
  align-items: start;
}

.change-main {
  min-width: 0;
}

.file-tree-backdrop {
  display: none;
}

.file-tree-backdrop[hidden] {
  display: none !important;
}

.file-tree-sidebar {
  display: flex;
  position: sticky;
  z-index: 20;
  top: var(--toolbar-inset);
  width: var(--file-tree-width);
  min-width: 0;
  height: calc(100svh - var(--toolbar-inset));
  align-self: start;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: var(--surface);
  flex-direction: column;
}

.file-tree-resizer {
  position: sticky;
  z-index: 21;
  top: var(--toolbar-inset);
  width: var(--file-tree-resizer-width);
  height: calc(100svh - var(--toolbar-inset));
  align-self: start;
  background: var(--workspace);
  cursor: col-resize;
  touch-action: none;
}

.file-tree-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 0.5px);
  width: 1px;
  background: var(--border);
  transition: left 120ms ease, width 120ms ease, background 120ms ease;
}

.file-tree-resizer:hover::before,
.file-tree-resizer.is-resizing::before {
  left: calc(50% - 1.5px);
  width: 3px;
  background: var(--muted-strong);
}

.file-tree-resizer.is-resizing {
  background: color-mix(in srgb, var(--muted) 10%, var(--workspace));
}

body.file-tree-resizing,
body.file-tree-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.file-tree-header,
.file-tree-heading,
.file-tree-actions {
  display: flex;
  align-items: center;
}

.file-tree-header {
  min-height: 2.75rem;
  padding: 0.42rem 0.55rem 0.42rem 0.72rem;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-soft);
}

.file-tree-heading {
  min-width: 0;
  gap: 0.45rem;
}

.file-tree-heading h2 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.file-tree-count {
  min-width: 1.35rem;
  border-radius: 999px;
  padding: 0.16rem 0.38rem;
  color: var(--muted);
  background: var(--surface-subtle);
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1;
  text-align: center;
}

.file-tree-actions {
  flex: 0 0 auto;
  gap: 0.12rem;
}

button.file-tree-action {
  width: 1.8rem;
  min-width: 1.8rem;
  height: 1.8rem;
  min-height: 1.8rem;
  border: 0;
  border-radius: 0.32rem;
  padding: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

button.file-tree-action:hover,
button.file-tree-action.active {
  color: var(--foreground);
  background: var(--surface-subtle);
}

button.file-tree-action:active {
  transform: none;
}

.drawer-close {
  display: none !important;
  font-size: 1.15rem;
  font-weight: 400;
}

.tree-search-icon {
  position: relative;
  width: 0.68rem;
  height: 0.68rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.tree-search-icon::after {
  content: "";
  position: absolute;
  width: 0.34rem;
  border-top: 1.5px solid currentColor;
  right: -0.27rem;
  bottom: -0.14rem;
  transform: rotate(45deg);
}

.file-tree-search {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border-soft);
}

.file-tree-search input {
  width: 100%;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  padding: 0 0.55rem;
  color: var(--foreground);
  background: var(--surface-subtle);
  font-family: var(--mono);
  font-size: 0.7rem;
  outline: none;
}

.file-tree-search input:focus-visible {
  border-color: var(--muted);
  background: var(--surface);
}

.file-tree-status-filters {
  display: flex;
  min-height: 2.35rem;
  padding: 0.34rem 0.55rem;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-soft);
}

button.tree-status-filter {
  width: 2rem;
  min-width: 2rem;
  min-height: 1.65rem;
  border: 1px solid transparent;
  border-radius: 0.32rem;
  padding: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

button.tree-status-filter:hover {
  border-color: var(--border);
  color: var(--foreground);
  background: var(--surface-subtle);
}

button.tree-status-filter.active {
  border-color: var(--border);
  color: var(--foreground);
  background: var(--surface-subtle);
  box-shadow: inset 0 0 0 1px var(--border-soft);
}

button.tree-status-filter:active,
button.file-tree-row:active {
  transform: none;
}

.tree-status-name {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.file-tree-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.28rem 0;
  scrollbar-gutter: stable;
}

button.file-tree-row {
  display: flex;
  width: 100%;
  min-height: 1.78rem;
  align-items: center;
  justify-content: flex-start;
  gap: 0.38rem;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding-top: 0.25rem;
  padding-right: 0.5rem;
  padding-bottom: 0.25rem;
  color: var(--muted-strong);
  background: transparent;
  box-shadow: none;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 480;
  line-height: 1.2;
  text-align: left;
}

button.file-tree-row:hover {
  color: var(--foreground);
  background: var(--surface-subtle);
}

button.file-tree-row:disabled,
button.file-tree-row:disabled:hover {
  color: var(--muted-strong);
  background: transparent;
  cursor: default;
  opacity: 1;
}

button.file-tree-row.selected {
  color: var(--foreground);
  background: color-mix(in srgb, var(--foreground) 8%, var(--surface));
  box-shadow: inset 2px 0 0 var(--foreground);
}

.tree-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-disclosure {
  width: 0.36rem;
  height: 0.36rem;
  flex: 0 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--muted);
  transform: rotate(-45deg);
  transition: transform 120ms ease;
}

.directory-row[aria-expanded="true"] .tree-disclosure {
  transform: rotate(45deg);
}

.tree-directory-icon {
  position: relative;
  width: 0.82rem;
  height: 0.58rem;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--muted) 70%, var(--border));
  border-radius: 0.1rem;
  background: var(--surface-subtle);
}

.tree-directory-icon::before {
  content: "";
  position: absolute;
  top: -0.25rem;
  left: -1px;
  width: 0.38rem;
  height: 0.22rem;
  border: 1px solid color-mix(in srgb, var(--muted) 70%, var(--border));
  border-bottom: 0;
  border-radius: 0.1rem 0.1rem 0 0;
  background: var(--surface-subtle);
}

.tree-file-status {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 0.2rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 750;
  line-height: 1;
}

.tree-status-added {
  color: var(--green);
  background: var(--green-bg);
}

.tree-status-removed {
  color: var(--red);
  background: var(--red-bg);
}

.tree-status-renamed,
.tree-status-copied {
  color: #896d15;
  background: rgba(229, 184, 35, 0.12);
}

.tree-status-modified {
  color: var(--muted-strong);
  background: var(--border-soft);
}

.file-tree-empty {
  margin: 1.5rem 0.75rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.empty-state,
.commit-card,
.file-card {
  border: 1px solid var(--border);
  background: var(--surface);
}

.empty-state {
  display: flex;
  min-height: 5rem;
  padding: 1.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.landing > .empty-state {
  min-height: auto;
}

.empty-state p {
  margin: 0;
}

.spinner {
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  border: 2px solid var(--border);
  border-top-color: var(--foreground);
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

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

.error {
  color: #a12435;
}

.commit-card {
  display: grid;
  min-width: 0;
  border-width: 0 0 1px;
  padding: 0.5rem 0.75rem;
}

.file-heading,
.file-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.section-label {
  margin: 0 0 0.26rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.change-titlebar {
  display: flex;
  position: sticky;
  z-index: 25;
  top: var(--toolbar-inset);
  min-width: 0;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  color: var(--foreground);
  background: var(--surface);
}

.commit-message-title,
.commit-message-body {
  min-width: 0;
  margin: 0;
  font-family: var(--mono);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.commit-message-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.commit-message-body {
  font-size: 0.75rem;
  font-weight: 400;
}

.file-status {
  position: relative;
  width: 0.78rem;
  height: 0.92rem;
  flex: 0 0 auto;
  border: 1px solid #b9b9bd;
  border-radius: 0.12rem;
  background: var(--surface-subtle);
}

.file-status::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 0.28rem;
  height: 0.28rem;
  border-bottom: 1px solid currentColor;
  border-left: 1px solid currentColor;
  background: var(--surface);
}

.status-added {
  border-color: color-mix(in srgb, var(--green) 58%, var(--border));
  color: var(--green);
  background: color-mix(in srgb, var(--green-bg) 60%, var(--surface));
}

.status-removed {
  border-color: color-mix(in srgb, var(--red) 58%, var(--border));
  color: var(--red);
  background: color-mix(in srgb, var(--red-bg) 60%, var(--surface));
}

.status-renamed {
  border-color: #b99a36;
  color: #896d15;
  background: rgba(229, 184, 35, 0.12);
}

.file-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.file-card {
  min-width: 0;
  overflow: visible;
  border-width: 1px 0;
  scroll-margin-top: calc(var(--toolbar-inset) + var(--change-title-height) + 0.5rem);
}

.file-card[data-render-contained="true"] {
  content-visibility: auto;
  contain-intrinsic-block-size: auto var(--file-intrinsic-block-size);
}

.file-card.expanded {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.025);
}

.file-heading {
  position: sticky;
  z-index: 10;
  top: calc(var(--toolbar-inset) + var(--change-title-height));
  min-height: var(--file-heading-height);
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  backdrop-filter: blur(12px);
}

.file-name-controls {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  gap: 0.4rem;
}

.file-toggle {
  display: flex;
  min-width: 0;
  min-height: 2rem;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 0.52rem;
  overflow: hidden;
  border: 0;
  border-radius: 0.32rem;
  padding: 0.28rem 0.34rem;
  color: var(--muted-strong);
  background: transparent;
  box-shadow: none;
  font-weight: 500;
}

.file-toggle:hover {
  border-color: transparent;
  color: var(--foreground);
  background: var(--surface-subtle);
}

.file-toggle:active {
  transform: none;
}

.disclosure-icon {
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--muted);
  transform: rotate(-45deg);
  transition: transform 120ms ease;
}

.file-card.expanded .disclosure-icon {
  transform: rotate(45deg);
}

.file-path {
  min-width: 0;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-actions {
  flex: 0 0 auto;
}

.status-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 570;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.file-stats {
  display: inline-flex;
  flex: none;
  gap: 0.42rem;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.file-stats .additions {
  color: var(--green);
}

.file-stats .deletions {
  color: var(--red);
}

.file-message {
  margin: 0;
  padding: 1rem;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 0.8rem;
}

.file-message p {
  margin-top: 0;
}

.structural-empty {
  color: var(--muted-strong);
  background: var(--surface-subtle);
}

.structural-empty p {
  margin: 0;
}

.diff-notice {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  border-top: 1px solid var(--border-soft);
  padding: 0.62rem 0.85rem;
  color: var(--muted-strong);
  background: color-mix(in srgb, #b99a36 8%, var(--surface));
  font-size: 0.74rem;
  line-height: 1.4;
}

.diff-notice strong {
  flex: 0 0 auto;
  color: #806615;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.semantic-document,
.semantic-whole,
.semantic-section,
.semantic-deleted-group {
  min-width: 0;
}

.semantic-section + .semantic-section,
.semantic-deleted-group {
  border-top: 1px solid var(--border);
}

.semantic-section-title,
.semantic-reorder,
.semantic-deleted-group > h4 {
  margin: 0;
  border-top: 1px solid var(--border-soft);
  padding: 0.48rem 0.85rem;
  color: var(--muted-strong);
  background: var(--surface-subtle);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.45;
}

.semantic-section-title {
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.semantic-section-label {
  flex: 1;
  min-width: 0;
}

.semantic-section > .review-scroll {
  padding-top: 8px;
}

.section-change-controls {
  display: inline-flex;
  flex: none;
  gap: 0.2rem;
}

.section-change-button {
  width: auto;
  min-width: 4rem;
  height: 1.65rem;
  padding: 0 0.4rem;
  white-space: nowrap;
  color: #000;
  font-weight: 400;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  font-size: 1rem;
  line-height: 1;
}

.section-change-button:hover:enabled {
  color: #0969da;
  font-weight: 700;
  border-color: var(--border);
  background: var(--surface);
}

.section-change-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -1px;
}

.section-change-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.semantic-section > .semantic-section-title {
  position: relative;
  padding-left: 2rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: color 120ms ease, background 120ms ease;
}

.semantic-section[open] > .semantic-section-title {
  position: sticky;
  z-index: 9;
  top: calc(var(--toolbar-inset) + var(--change-title-height) + var(--file-heading-inset));
}

.semantic-section > .semantic-section-title::-webkit-details-marker {
  display: none;
}

.semantic-section > .semantic-section-title::marker {
  content: "";
}

.semantic-section > .semantic-section-title::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.95rem;
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(-45deg);
  transition: transform 120ms ease;
}

.semantic-section[open] > .semantic-section-title::before {
  transform: translateY(-65%) rotate(45deg);
}

.semantic-section > .semantic-section-title:hover {
  color: var(--foreground);
  background: color-mix(in srgb, var(--foreground) 4%, var(--surface-subtle));
}

.semantic-section > .semantic-section-title:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
  color: var(--foreground);
}

.semantic-reorder {
  color: #806615;
  background: color-mix(in srgb, #b99a36 8%, var(--surface));
}

.semantic-deleted-group > h4 {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.semantic-section .diff-notice,
.semantic-whole .diff-notice {
  border-top: 0;
}

.loading-inline::before {
  content: "";
  display: inline-block;
  width: 0.58rem;
  height: 0.58rem;
  margin-right: 0.45rem;
  border: 1.5px solid var(--border);
  border-top-color: var(--foreground);
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

.diff-scroll {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--surface);
  overscroll-behavior-x: contain;
  scrollbar-color: #c5c5c5 transparent;
  scrollbar-width: thin;
}

.diff-scroll table {
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--code-foreground);
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.66;
}

.diff-scroll table.split {
  min-width: 0;
}

.diff-scroll table.unified {
  min-width: 0;
}

.diff-scroll td {
  vertical-align: top;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.diff-scroll table.split td.ctx,
.diff-scroll table.split td.del,
.diff-scroll table.split td.add,
.diff-scroll table.split td.empty {
  width: calc(50% - 3rem);

  padding: 0 0.72rem;
}

.diff-scroll table.split.single-sided td.ctx,
.diff-scroll table.split.single-sided td.del,
.diff-scroll table.split.single-sided td.add,
.diff-scroll table.split.single-sided td.empty {
  width: calc(100% - 3rem);
}

.diff-scroll table.unified td.ctx,
.diff-scroll table.unified td.del,
.diff-scroll table.unified td.add,
.diff-scroll table.unified td.empty {
  width: calc(100% - 6rem);
  padding: 0 0.72rem;
}

.diff-scroll td.line-number {
  width: 3rem;
  min-width: 3rem;
  max-width: 3rem;
  padding: 0 0.58rem 0 0.3rem;
  color: #929292;
  background: var(--surface);
  text-align: right;
  user-select: none;
}

.diff-scroll table.split:not(.single-sided) td.new-line-number {
  border-left: 1px solid var(--border-soft);
}

.diff-scroll .hunk-header {
  height: 2.45rem;
  border: 0.38rem solid var(--surface);
  border-radius: 0.72rem;
  padding: 0 0.55rem;
  color: var(--muted);
  background: var(--hunk);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 430;
  line-height: 1.68rem;
}

.diff-scroll td.hunk-note {
  border: 0.38rem solid var(--surface);
  border-top: 0;
  padding: 0.55rem 0.8rem;
  color: var(--muted-strong);
  background: color-mix(in srgb, #8064c8 7%, var(--surface));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: normal;
}

.diff-scroll .hunk-note-title {
  color: color-mix(in srgb, #8064c8 78%, var(--foreground));
  font-weight: 650;
}

.diff-scroll .ctx {
  background: var(--surface);
}

.diff-scroll .del {
  background: var(--del);
}

.diff-scroll .add {
  background: var(--add);
}

.diff-scroll .ignored-context {
  color: var(--code-foreground);
  font-weight: inherit;
}

.diff-scroll .empty {
  background-color: var(--surface-subtle);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 4px,
    var(--empty-stripe) 4px,
    var(--empty-stripe) 5px
  );
}

.diff-scroll table.split tr:has(> td.del) > td.old-line-number {
  color: var(--red);
  background: var(--del);
  box-shadow: inset 3px 0 var(--red-bright);
}

.diff-scroll table.split tr:has(> td.add) > td.new-line-number {
  color: var(--green);
  background: var(--add);
  box-shadow: inset 3px 0 var(--green-bright);
}

.diff-scroll table.unified tr:has(> td.del) > td.line-number {
  color: var(--red);
  background: var(--del);
}

.diff-scroll table.unified tr:has(> td.del) > td.old-line-number,
.diff-scroll table.unified tr:has(> td.add) > td.old-line-number {
  box-shadow: inset 3px 0 currentColor;
}

.diff-scroll table.unified tr:has(> td.add) > td.line-number {
  color: var(--green);
  background: var(--add);
}

/* Only a completed intraline comparison can establish a neutral Token side.
   Keep line-level changes when refinement was skipped or exceeded its budget. */
.file-card[data-diff-algorithm="token"] .diff-scroll td.diff-neutral:is(.del, .add, .line-number) {
  background: var(--surface);
}

.diff-scroll b.wd {
  border-radius: 0.12rem;
  background: var(--del-strong);
  font-weight: inherit;
}

.diff-scroll b.wa {
  border-radius: 0.12rem;
  background: var(--add-strong);
  font-weight: inherit;
}

.syntax-keyword,
.syntax-modifier,
.syntax-boolean {
  color: var(--syntax-keyword);
}

.syntax-control,
.syntax-async,
.syntax-attribute {
  color: var(--syntax-control);
}

/* The extension's keyword.control.moonbit.async TextMate customization. */
.syntax-async {
  font-style: italic;
}

.syntax-function { color: var(--syntax-function); }
.syntax-type,
.syntax-package { color: var(--syntax-type); }
.syntax-variable { color: var(--syntax-variable); }
.syntax-number { color: var(--syntax-number); }
.syntax-string { color: var(--syntax-string); }
.syntax-escape { color: var(--syntax-escape); }
.syntax-comment { color: var(--syntax-comment); }
.syntax-operator { color: var(--syntax-operator); }
.syntax-interpolation { color: var(--syntax-interpolation); }
.syntax-attribute-parameter { color: var(--syntax-attribute-parameter); }

.review-gutter {
  position: relative;
}

.line-comment-button {
  position: absolute;
  inset: 0.08rem auto auto 0.12rem;
  display: block;
  opacity: 0;
  pointer-events: none;
  width: 1.15rem;
  height: 1.15rem;
  min-height: 1.15rem;
  border: 0;
  border-radius: 0.22rem;
  padding: 0;
  color: #fff;
  background: #0969da;
  font: 700 0.8rem/1.15rem -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
  cursor: pointer;
}

.review-gutter:hover .line-comment-button,
.line-comment-button:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.review-gutter:hover .line-number-value,
.review-gutter:focus-within .line-number-value {
  opacity: 0;
}

.review-scroll {
  container: review / inline-size;
}

.github-comment,
.review-thread,
.comment-editor,
.comment-reply-entry,
.comment-menu {
  min-width: 0;
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.comment-editor {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  background: var(--surface-subtle);
}

.comment-editor-content {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 8px;
}

.comment-textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 100px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--foreground);
  background: var(--surface);
  font: inherit;
  line-height: 1.5;
}

.comment-textarea:focus {
  border-color: #0969da;
  outline: 2px solid color-mix(in srgb, #0969da 22%, transparent);
}

.comment-editor-actions,
.auth-controls,
.comments-toolbar > div:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.48rem;
}

.comment-editor button,
.comment-delete-actions button {
  min-height: 32px;
  border-radius: 6px;
  padding: 5px 12px;
  font: 600 12px/20px -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  white-space: normal;
}

button.comment-submit {
  border: 1px solid #1f883d;
  color: #fff;
  background: #1f883d;
  cursor: pointer;
}

button.comment-submit:hover {
  border-color: #1a7f37;
  background: #1a7f37;
}

.comment-editor button:disabled,
.comment-delete-actions button:disabled,
.comment-menu button:disabled,
.comment-reply-entry button:disabled {
  cursor: default;
  opacity: 0.56;
}

button.comment-cancel,
button.comment-delete-confirm {
  border: 1px solid var(--border);
  color: var(--foreground);
  background: var(--surface);
}

button.comment-delete-confirm {
  color: var(--red);
}

button.comment-cancel:hover,
button.comment-delete-confirm:hover {
  background: var(--surface-subtle);
}

.comment-error {
  margin: 0;
  color: var(--red);
  white-space: normal;
  overflow-wrap: anywhere;
}

.comments-overview,
.file-discussions {
  border: 1px solid var(--border-soft);
  border-radius: 0.75rem;
  padding: 0.85rem;
  background: var(--surface);
}

.comments-overview {
  display: grid;
  gap: 0.8rem;
}

.comments-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.comments-toolbar h2,
.file-discussions h3 {
  margin: 0;
}

.auth-status,
.auth-controls,
.comments-loading,
.outdated-discussions > p {
  color: var(--muted);
  font-size: 0.76rem;
}

.overall-comments,
.active-discussions,
.outdated-discussions {
  display: grid;
  gap: 0.62rem;
}

.github-comment,
.review-thread {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.github-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 0;
}

.comment-byline {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
}

.comment-byline strong {
  font-weight: 600;
}

.comment-byline time {
  color: var(--muted);
  font-size: 12px;
}

.comment-avatar {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--border-soft);
  box-shadow: inset 0 0 0 1px var(--border);
}

.comment-avatar-placeholder::before,
.comment-avatar-placeholder::after {
  content: "";
  position: absolute;
  background: var(--muted);
  border-radius: 50%;
}

.comment-avatar-placeholder::before {
  width: 10px;
  height: 10px;
  top: 6px;
  left: 11px;
}

.comment-avatar-placeholder::after {
  width: 22px;
  height: 18px;
  top: 18px;
  left: 5px;
}

.comment-avatar-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.github-comment-body {
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-thread > .github-comment,
.review-thread > .comment-editor {
  border: 0;
  border-radius: 0;
}

.review-thread > .github-comment + .github-comment,
.review-thread > .comment-editor,
.comment-reply-entry {
  border-top: 1px solid var(--border);
}

.comment-reply-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-subtle);
}

button.comment-reply-button {
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: none;
  font: inherit;
  white-space: normal;
}

button.comment-reply-button:hover {
  color: var(--foreground);
  border-color: var(--muted);
}

.comment-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

button.comment-more {
  width: 32px;
  height: 32px;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font: 600 22px/1 sans-serif;
}

button.comment-more:hover,
button.comment-more[aria-expanded="true"] {
  color: var(--foreground);
  background: var(--surface-subtle);
}

.comment-menu {
  position: fixed;
  inset: auto;
  width: 192px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  color: var(--foreground);
  background: var(--surface);
  box-shadow: 0 8px 24px #0003;
}

.comment-menu [role="menuitem"] {
  display: block;
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  padding: 6px 8px;
  color: var(--foreground);
  background: transparent;
  box-shadow: none;
  font: inherit;
  text-align: left;
  text-decoration: none;
  white-space: normal;
}

.comment-menu button.comment-delete {
  color: var(--red);
}

.comment-menu [role="menuitem"]:hover,
.comment-menu [role="menuitem"]:focus-visible {
  outline: none;
  background: var(--border-soft);
}

.comment-more:active,
.comment-reply-button:active,
.comment-menu button:active {
  transform: none;
}

.outdated-discussions {
  border-top: 1px dashed var(--border);
  margin-top: 0.25rem;
  padding-top: 0.7rem;
  opacity: 0.84;
}

.file-discussions:empty {
  display: none;
}

@media (max-width: 600px) {
  .shell {
    width: calc(100% - 1rem);
  }

  .shell.workspace {
    width: 100%;
  }

  .hero-workspace,
  .comments-toolbar {
    align-items: stretch;
  }

  .diff-scroll table.split {
    min-width: 0;
  }

  .diff-scroll table.unified {
    min-width: 0;
  }
}

footer {
  width: 100%;
  padding: 1.5rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.landing footer {
  margin-top: 1.55rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border-soft);
}

.workspace footer {
  display: none;
}

@media (max-width: 767px) {
  .change-layout {
    display: block;
  }

  .file-tree-resizer {
    display: none;
  }

  .file-tree-trigger {
    display: inline-flex !important;
    width: auto !important;
    padding-inline: 0.42rem !important;
  }

  button.file-tree-backdrop {
    display: block;
    position: fixed;
    z-index: 44;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    cursor: default;
    touch-action: none;
  }

  button.file-tree-backdrop,
  button.file-tree-backdrop:hover,
  button.file-tree-backdrop:active {
    border: 0;
    background: rgba(0, 0, 0, 0.42);
    transform: none;
  }

  .file-tree-sidebar {
    position: fixed;
    z-index: 45;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(76svh, 42rem);
    max-height: calc(100svh - 1.5rem);
    border: 1px solid var(--border);
    border-width: 1px 0 0;
    border-radius: 0.8rem 0.8rem 0 0;
    box-shadow: 0 -0.8rem 2.4rem rgba(0, 0, 0, 0.16);
    transform: translateY(102%);
    visibility: hidden;
    transition: transform 180ms ease, visibility 180ms step-end;
  }

  .file-tree-sidebar.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 180ms ease, visibility 0s step-start;
  }

  .file-tree-header {
    min-height: 3.15rem;
    padding-inline: 0.8rem 0.65rem;
  }

  .drawer-close {
    display: inline-flex !important;
  }

  button.file-tree-row {
    min-height: 2.05rem;
  }
}

@media (max-width: 980px) {
  .hero-workspace {
    grid-template-areas:
      "brand form account"
      "actions actions actions";
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .3rem .65rem;
  }

  .hero-workspace .account-control {
    margin-inline-start: 0;
  }

  :root {
    --toolbar-height: 5.25rem;
  }
}

@media (max-width: 680px) {
  .landing {
    min-height: 100svh;
    padding: 1.5rem 1.15rem;
  }

  .hero-workspace {
    padding: 0.38rem 0.55rem;
  }

  .workspace-actions {
    grid-area: actions;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .file-toggle {
    padding-left: 0.16rem;
  }

  .status-label {
    display: none;
  }
}

@media (max-width: 540px) {
  :root {
    --toolbar-height: 7.375rem;
  }

  .filter-controls {
    flex-basis: 100%;
  }
}

@media (max-width: 460px) {
  .brand-suffix {
    display: none;
  }

  .lede {
    font-size: 0.92rem;
  }

  .route-example {
    font-size: 0.74rem;
  }

  .input-row {
    padding-left: 0.7rem;
  }

  .input-row input {
    font-size: 0.86rem;
  }

  .hero-landing .submit-button {
    width: 2.3rem;
    padding: 0;
  }

  .hero-landing .submit-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .file-heading {
    padding-inline: 0.5rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #101010;
    --workspace: #0b0b0b;
    --surface: #171717;
    --surface-subtle: #1d1d1d;
    --foreground: #f1f1f1;
    --muted: #9b9b9b;
    --muted-strong: #c2c2c2;
    --home-link: #79b8ff;
    --border: #333333;
    --border-soft: #292929;
    --focus: rgba(255, 255, 255, 0.18);
    --green: #36d49a;
    --red: #ff7774;
    --warning: #d4a72c;
    --green-bg: rgba(7, 196, 128, 0.1);
    --red-bg: rgba(255, 103, 98, 0.1);
    --add: #10291f;
    --add-strong: #195f45;
    --del: #321a1b;
    --del-strong: #6a2c2d;
    --code-foreground: #c7c7cb;
    /* VSCode Dark+ (including dark_vs.json). */
    --syntax-keyword: #569cd6;
    --syntax-control: #c586c0;
    --syntax-function: #dcdcaa;
    --syntax-type: #4ec9b0;
    --syntax-variable: #9cdcfe;
    --syntax-number: #b5cea8;
    --syntax-string: #ce9178;
    --syntax-escape: #d7ba7d;
    --syntax-comment: #6a9955;
    --syntax-operator: #d4d4d4;
    --syntax-interpolation: #569cd6;
    --syntax-attribute-parameter: #569cd6;
    --hunk: #242424;
    --empty-stripe: #333333;
  }

  .input-row input::placeholder {
    color: #777777;
  }

  .section-change-button {
    color: #fff;
  }

  .error {
    color: #ff8e96;
  }

  .diff-notice strong {
    color: #d7b94f;
  }

  .semantic-reorder {
    color: #d7b94f;
  }

  .diff-scroll td.line-number {
    color: #707070;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Algorithm and filter controls retain distinct selected states in both themes. */
button.segmented-option,
.toolbar-filter {
  transition: transform 120ms ease;
  width: auto;
  padding: 0 0.5rem;
  color: #353535;
  border: 0;
  background: #fff;
}

@media (prefers-color-scheme: dark) {
  button.segmented-option,
  .toolbar-filter {
    color: #eee;
    background: #242424;
  }
}

/* OpenSeek GUI soft and strong accents (desktop/styles/tokens.css). */
button.segmented-option.active,
.toolbar-filter.active {
  color: #2a55cc;
  background: #eef2fe;
  font-weight: 700;
}

@media (max-width: 360px) {
  button.segmented-option {
    padding-inline: 0.375rem;
  }
}

.diff-scroll col.gutter-column {
  width: 3rem;
}

.diff-scroll .line-number {
  white-space: nowrap;
  overflow-wrap: normal;
}

.diff-scroll .inline-discussion-row > td,
.diff-scroll .inline-comment-editor-row > td {
  width: auto;
  max-width: none;
  border-bottom: 1px solid var(--border-soft);
  white-space: normal;
  padding: 0;
  background: var(--surface-subtle);
}

.inline-discussion {
  min-width: 0;
  padding: 12px;
}

@container review (min-width: 720px) {
  .split:not(.single-sided) .inline-discussion {
    width: 50%;
  }

  .split:not(.single-sided) .inline-right {
    margin-left: auto;
  }
}

.comment-location {
  margin: 0 0 8px;
  color: var(--muted-strong);
  font: 400 12px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  overflow-wrap: anywhere;
}

.comment-location::before {
  content: "↳ ";
}

.file-discussions {
  display: grid;
  gap: 12px;
}

.comment-delete-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-soft);
  padding: 12px;
  background: var(--surface-subtle);
}

.comment-delete-actions .comment-error {
  flex-basis: 100%;
}

.github-comment > .comment-error {
  padding: 0 12px 12px;
}

.device-auth {
  align-items: flex-start;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 100%;
}
.device-auth p { margin: 0; }
.device-code-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.device-code { font-family: ui-monospace, monospace; font-size: 1.4rem; font-weight: 700; letter-spacing: 0.12em; user-select: all; }
.device-open { text-decoration: none; }
.device-progress { font-size: 0.875rem; }

.viewed-control, .viewed-label, .viewed-progress-content, .viewed-sign-in {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.viewed-control { flex-wrap: wrap; justify-content: flex-end; }
.viewed-label {
  padding: 0.3rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
}
.viewed-label:hover { background: var(--surface-subtle); }
.viewed-label.is-viewed { background: color-mix(in srgb, #0969da 12%, var(--surface)); }
.viewed-label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.viewed-label:has(input:disabled) { cursor: default; color: var(--muted); }
.viewed-label input { width: 1rem; height: 1rem; margin: 0; accent-color: #0969da; }
.viewed-spinner { width: 0.7rem; height: 0.7rem; }
.viewed-dismissed, .viewed-refreshing { color: var(--muted); font-size: 0.7rem; }
.viewed-retry { padding: 0.2rem 0.4rem; font-size: 0.7rem; }
.viewed-progress { margin: 0.75rem 0; font-size: 0.8rem; }
.viewed-progress-content, .viewed-sign-in { flex-wrap: wrap; }
.viewed-progress-track { width: 8rem; height: 0.45rem; border-radius: 1rem; overflow: hidden; background: var(--border-soft); }
.viewed-progress-fill { height: 100%; background: #0969da; transition: width 120ms ease; }
.viewed-error { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; width: 100%; color: var(--muted-strong); }
.tree-viewed { margin-left: auto; color: #0969da; font-weight: 700; }
@media (max-width: 767px) {
  .viewed-label { padding: 0.25rem; }
  .viewed-dismissed { display: none; }
  .file-actions:has(.viewed-control) { gap: 0.3rem; }
}

.viewed-file-error { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; color: var(--muted-strong); font-size: 0.8rem; }

.viewed-confirming {
  max-width: 12rem;
  white-space: normal;
  color: var(--muted-strong);
  font-size: 0.7rem;
}

.viewed-confirmation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.pull-merge-card {
  display: grid;
  gap: 0.85rem;
  margin: 0.75rem 0;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.9rem;
  background: var(--surface);
}

.pull-merge-header,
.pull-ci-summary,
.pull-ci-check-row,
.pull-merge-actions,
.pull-merge-action-state {
  display: flex;
  align-items: center;
}

.pull-merge-header {
  justify-content: space-between;
  gap: 0.75rem;
}

.pull-merge-header h2,
.pull-merge-action-state p,
.pull-merge-error,
.pull-ci-warning ul {
  margin: 0;
}

.pull-merge-header h2 {
  font-size: 1rem;
}

.pull-merge-live {
  display: grid;
  gap: 0.75rem;
}

.pull-ci-summary {
  min-width: 0;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  font-size: 0.88rem;
}

.pull-ci-disclosure {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
}

.pull-ci-disclosure > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.pull-ci-disclosure > summary::-webkit-details-marker { display: none; }
.pull-ci-disclosure > summary::marker { content: ""; }
.pull-ci-disclosure > summary:hover { background: var(--surface-subtle); }
.pull-ci-disclosure > summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.pull-ci-disclosure[open] > summary {
  border-bottom: 1px solid var(--border-soft);
}

.pull-ci-summary-empty {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.pull-ci-summary-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.08rem;
  color: var(--foreground);
}

.pull-ci-count {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 400;
}

.pull-ci-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
  color: var(--home-link);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
}

.pull-ci-hide-label { display: none; }
.pull-ci-disclosure[open] .pull-ci-show-label { display: none; }
.pull-ci-disclosure[open] .pull-ci-hide-label { display: inline; }

.pull-ci-chevron {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.08rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  color: var(--muted-strong);
  font-size: 0;
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 120ms ease;
}

.pull-ci-disclosure[open] .pull-ci-chevron { transform: rotate(45deg); }

.pull-ci-icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.ci-success { color: var(--green); }
.ci-failure { color: var(--red); }
.ci-pending { color: var(--warning); }
.ci-neutral { color: var(--muted-strong); }

.pull-ci-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pull-ci-check {
  min-width: 0;
  border-top: 1px solid var(--border-soft);
}

.pull-ci-check:first-child { border-top: 0; }

.pull-ci-check-row {
  min-width: 0;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  color: inherit;
  text-decoration: none;
}

a.pull-ci-check-row:hover { background: var(--surface-subtle); }
a.pull-ci-check-row:hover .pull-ci-name { text-decoration: underline; }

.pull-ci-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.12rem;
  color: var(--foreground);
}

.pull-ci-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pull-ci-state,
.pull-ci-warning,
.pull-merge-action-state {
  color: var(--muted);
  font-size: 0.76rem;
}

.pull-ci-details {
  flex: 0 0 auto;
  color: var(--home-link);
  font-size: 0.76rem;
}

.pull-ci-warning {
  border: 1px solid color-mix(in srgb, var(--warning) 38%, var(--border));
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  color: var(--muted-strong);
  background: color-mix(in srgb, #d8a51a 8%, var(--surface));
}

.pull-ci-warning ul {
  padding-left: 1.1rem;
}

.pull-merge-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--border-soft);
  padding-top: 0.8rem;
}

.pull-merge-action-state {
  width: 100%;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
}

.pull-merge-action-state.success { color: var(--green); }
.pull-merge-action-state.failure { color: var(--red); }
.pull-merge-action-state.pending { color: var(--warning); }
.pull-merge-error { color: var(--red); font-size: 0.8rem; overflow-wrap: anywhere; }

button.rebase-merge-button {
  border-color: #1f883d;
  color: #fff;
  background: #1f883d;
}

button.rebase-merge-button:hover { border-color: #1a7f37; background: #1a7f37; }
button.rebase-merge-button:disabled { cursor: default; opacity: 0.58; }

@media (max-width: 540px) {
  .pull-merge-card { border-radius: 0; padding-inline: 0.7rem; }
  .pull-ci-summary { align-items: flex-start; flex-wrap: wrap; }
  .pull-ci-toggle { margin-left: 1.9rem; }
  .pull-ci-check-row { align-items: flex-start; }
  .pull-merge-actions,
  .pull-merge-action-state { justify-content: stretch; }
  .pull-merge-actions button,
  .pull-merge-action-state button { width: 100%; }
}

/* Regions are independent roots without introducing layout boxes. */
.range-panel {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  margin: 0.75rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.9rem;
  background: var(--surface);
  font-size: 0.8rem;
}

.range-panel-heading,
.range-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.range-panel-heading h3 { margin: 0; font-size: 1rem; }
.range-review-title { min-width: 0; overflow-wrap: anywhere; }
.range-title-separator { color: var(--muted); white-space: nowrap; }
.range-panel-heading > span { color: var(--muted-strong); }
.range-selector-form { display: flex; flex-wrap: wrap; align-items: end; gap: 0.7rem; }
.range-field { display: grid; flex: 1 1 14rem; gap: 0.35rem; min-width: 0; font-weight: 600; }
.range-field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 0.4rem 0.55rem;
  color: var(--foreground);
  background: var(--surface);
  font: 0.78rem var(--mono);
}
.range-selector-form > .range-apply { align-self: end; }
.range-selector-form > a.range-apply { text-decoration: none; }
.range-summary,
.range-error,
.range-limit { margin: 0; }
.range-error { color: var(--red); }
.range-manual-reason { margin: 0 0 0.5rem; color: var(--muted); }
.range-limit { border-radius: 0.4rem; padding: 0.65rem; color: var(--warning); background: var(--surface-subtle); }
.range-links { justify-content: flex-start; }
.range-links a,
.range-limit a { color: var(--home-link); }
.range-commits ol { display: grid; gap: 0.35rem; margin: 0.5rem 0; padding-left: 1.4rem; }
.range-commits li { overflow-wrap: anywhere; }
.range-commits li code { margin-right: 0.6rem; }
.range-loading { margin-right: 0.5rem; color: var(--muted); }

.render-region { display: contents; }
/* Rabbita mount inserts an empty placeholder before the rendered root. */
.render-region > div:not([class]):empty { display: none; }
