:root {
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --bg-soft: #161b22;
  --surface: #161b22;
  --surface-muted: #0d1117;
  --surface-strong: #21262d;
  --line: #30363d;
  --line-strong: #484f58;
  --text: #e6edf3;
  --text-muted: #9da7b3;
  --text-subtle: #7d8590;
  --blue: #2f81f7;
  --blue-strong: #58a6ff;
  --blue-soft: rgba(56, 139, 253, 0.16);
  --orange: #db6d28;
  --orange-soft: rgba(219, 109, 40, 0.16);
  --red: #f85149;
  --red-soft: rgba(248, 81, 73, 0.16);
  --shadow: 0 16px 36px rgba(1, 4, 9, 0.26);
  --shadow-soft: none;
  --radius-xl: 8px;
  --radius-lg: 6px;
  --radius-md: 6px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background: var(--bg);
  line-height: 1.45;
  font-size: 13px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.gh-shell {
  min-height: 100vh;
}

.gh-global {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.gh-global-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

.gh-global-left,
.gh-global-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gh-logo {
  display: grid;
  height: 28px;
  width: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 700;
}

.gh-global-path,
.gh-repo-path {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.gh-global-path strong,
.gh-repo-path strong {
  color: var(--text);
  font-weight: 600;
}

.gh-slash {
  color: var(--text-subtle);
}

.gh-global-search {
  flex: 1;
  max-width: 420px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-subtle);
  font-size: 0.78rem;
}

.gh-inline-select {
  min-height: 34px;
  min-width: 160px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.gh-repo {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.gh-repo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
}

.gh-repo-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gh-repo-title h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.gh-repo-title p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.gh-tab-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.gh-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

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

.gh-tab.active {
  color: var(--text);
}

.gh-tab.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--orange);
}

.gh-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.gh-main {
  min-width: 0;
}

.gh-content-stack {
  display: grid;
  gap: 16px;
}

.gh-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.gh-panel {
  padding: 16px;
}

.gh-panel.inset {
  padding: 14px;
  background: transparent;
}

.gh-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.gh-panel-header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.gh-panel-header p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.gh-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gh-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
}

.gh-stat-label {
  color: var(--text-subtle);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gh-stat-value {
  display: block;
  margin-top: 6px;
  font-size: 1.25rem;
  font-weight: 600;
}

.gh-empty {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.sidebar-inner {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
}

.brand-mark {
  display: grid;
  height: 32px;
  width: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: none;
}

.brand-copy h1 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
}

.company-card,
.user-card,
.content-card,
.stat-card,
.auth-card,
.modal-card,
.team-card,
.plan-card,
.dropzone {
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  background: transparent;
  box-shadow: none;
}

.company-card,
.user-card {
  padding: 10px 0;
}

.company-card h2,
.page-header h1,
.auth-card h1 {
  margin: 0;
}

.eyebrow {
  color: var(--text-subtle);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.company-title {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
}

.company-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.nav-link:hover {
  background: rgba(177, 186, 196, 0.08);
  border-color: transparent;
  color: var(--text);
}

.nav-link.active {
  background: rgba(48, 54, 61, 0.64);
  border-color: transparent;
  color: var(--blue-strong);
  box-shadow: none;
}

.sidebar-footer {
  margin-top: auto;
}

.sidebar-footer .button {
  width: 100%;
}

.main {
  padding: 24px 24px 32px;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.page-header h1 {
  font-size: clamp(1.35rem, 2.3vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-header p {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.chip-row,
.actions-row,
.field-row,
.button-row,
.tab-row,
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip,
.status-pill,
.small-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.chip {
  background: rgba(48, 54, 61, 0.45);
  border: 1px solid transparent;
  color: var(--blue-strong);
}

.status-pill.info {
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.status-pill.warn {
  background: var(--orange-soft);
  color: #b45309;
}

.status-pill.success {
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.status-pill.error {
  background: var(--red-soft);
  color: var(--red);
}

.content-card,
.auth-card,
.modal-card,
.team-card,
.dropzone,
.plan-card,
.stat-card {
  padding: 14px;
}

.stack {
  display: grid;
  gap: 16px;
}

.grid-2,
.grid-3,
.stats-grid,
.plans-grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3,
.stats-grid,
.plans-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 18px;
}

.auth-card {
  width: min(680px, 100%);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.auth-card.narrow {
  width: min(520px, 100%);
}

.auth-card h1 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-card p.lead {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

.input,
.select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d1117;
  color: var(--text);
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.input:focus,
.select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #21262d;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.button:hover {
  transform: none;
  box-shadow: none;
  background: #30363d;
}

.button.primary {
  background: var(--blue);
  border-color: rgba(56, 139, 253, 0.28);
  color: white;
}

.button.primary:hover {
  background: var(--blue-strong);
}

.button.secondary {
  background: #21262d;
  border-color: var(--line);
}

.button.orange {
  background: rgba(219, 109, 40, 0.1);
  border-color: rgba(219, 109, 40, 0.18);
  color: var(--orange);
}

.button.orange:hover {
  background: rgba(219, 109, 40, 0.18);
  color: var(--orange);
}

.button.danger {
  background: rgba(248, 81, 73, 0.1);
  border-color: rgba(248, 81, 73, 0.18);
  color: var(--red);
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
}

.button.block {
  width: 100%;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.message {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  line-height: 1.5;
}

.message.info {
  background: rgba(56, 139, 253, 0.1);
  border-color: rgba(56, 139, 253, 0.16);
  color: var(--blue-strong);
}

.message.success {
  background: var(--blue-soft);
  border-color: rgba(56, 139, 253, 0.16);
  color: var(--blue-strong);
}

.message.warn {
  background: var(--orange-soft);
  border-color: rgba(219, 109, 40, 0.16);
  color: #ffa657;
}

.message.error {
  background: var(--red-soft);
  border-color: rgba(248, 81, 73, 0.16);
  color: var(--red);
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 240px;
  text-align: center;
  background: rgba(22, 27, 34, 0.56);
  border-style: dashed;
  border-width: 1px;
  border-color: var(--line);
}

.dropzone.is-valid {
  border-color: rgba(56, 139, 253, 0.32);
  background: rgba(56, 139, 253, 0.12);
}

.dropzone.is-dragging {
  background: rgba(48, 54, 61, 0.45);
}

.dropzone-icon {
  display: grid;
  height: 38px;
  width: 38px;
  place-items: center;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #21262d;
  color: var(--blue);
  font-size: 0.95rem;
  box-shadow: none;
}

.dropzone h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.dropzone p {
  margin: 6px 0 0;
  font-size: 0.78rem;
}

.dropzone-actions {
  justify-content: center;
  margin-top: 12px;
}

.dropzone-note {
  margin-top: 10px;
  color: var(--orange);
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(48, 54, 61, 0.9);
  border-radius: 6px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.72);
  text-align: left;
  vertical-align: top;
}

th {
  background: #161b22;
  color: var(--text-subtle);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

tbody tr:hover {
  background: rgba(177, 186, 196, 0.04);
}

.stat-card h3,
.plan-card h3,
.team-card h3,
.content-card h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.content-card,
.team-card,
.plan-card {
  background: transparent;
}

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

.subtle {
  color: var(--text-subtle);
}

.role-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.role-button {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #21262d;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: capitalize;
}

.role-button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.role-button:disabled {
  opacity: 0.45;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(1, 4, 9, 0.7);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.link {
  color: var(--blue-strong);
  font-weight: 700;
}

.plan-card.selected {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
  background: rgba(33, 38, 45, 0.52);
}

.plan-price {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.plan-list,
.plain-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.people-capacity {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.person-cell {
  min-width: 180px;
}

.person-cell strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.84rem;
}

.people-contact {
  min-width: 220px;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.people-actions {
  width: 1%;
  white-space: nowrap;
}

.recent-runs-table th:nth-child(1) {
  min-width: 220px;
}

.recent-runs-table th:nth-child(4) {
  min-width: 340px;
}

.recent-run-file strong {
  display: block;
  margin-bottom: 4px;
}

.schedule-cell {
  display: grid;
  gap: 8px;
}

.schedule-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.schedule-input {
  flex: 1 1 240px;
}

.schedule-save-button {
  min-height: 48px;
  padding: 10px 14px;
  white-space: nowrap;
}

.schedule-cell .message,
.schedule-cell .small-note {
  width: fit-content;
  max-width: 100%;
}

.content-card > .table-wrap:only-child,
.team-card > .table-wrap:only-child,
.content-card > .message:first-child,
.team-card > .message:first-child {
  margin-top: 0;
}

.docs-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 0;
  height: calc(100dvh - 286px);
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.docs-sidebar,
.docs-viewer {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.docs-sidebar {
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.docs-sidebar-body {
  display: grid;
  gap: 4px;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 100%;
  padding: 12px;
  overflow: auto;
  align-content: start;
}

.doc-tree-group {
  display: grid;
  gap: 4px;
}

.doc-tree-children {
  display: grid;
  gap: 4px;
}

.doc-tree-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px 8px calc(10px + (var(--doc-depth, 0) * 16px));
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
}

.doc-tree-button:hover {
  background: rgba(177, 186, 196, 0.08);
  color: var(--text);
}

.doc-tree-button.directory {
  font-weight: 600;
}

.doc-tree-button.article.active {
  border-color: rgba(56, 139, 253, 0.22);
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.doc-tree-icon {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  color: var(--text-subtle);
  position: relative;
}

.doc-tree-icon-chevron::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 140ms ease;
}

.doc-tree-button.directory.expanded .doc-tree-icon-chevron::before {
  transform: rotate(45deg);
}

.doc-tree-icon-article {
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.doc-tree-icon-article::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 2px;
  width: 7px;
  height: 1.5px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
}

.doc-tree-button.article.active .doc-tree-icon,
.doc-tree-button.directory.expanded .doc-tree-icon {
  color: var(--blue-strong);
}

.doc-tree-label {
  min-width: 0;
}

.docs-viewer {
  overflow: hidden;
}

.docs-viewer-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 20px 20px;
  overflow: auto;
}

.docs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--text-subtle);
  font-size: 0.74rem;
  line-height: 1.5;
}

.docs-breadcrumb-separator {
  color: var(--line-strong);
}

.docs-article {
  color: var(--text);
}

.docs-article h1,
.docs-article h2,
.docs-article h3,
.docs-article h4,
.docs-article h5,
.docs-article h6 {
  margin: 1.4em 0 0.6em;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.docs-article h1 {
  margin-top: 0;
  font-size: 1.7rem;
}

.docs-article h2 {
  font-size: 1.25rem;
}

.docs-article h3 {
  font-size: 1rem;
}

.docs-article p,
.docs-article ul,
.docs-article ol,
.docs-article blockquote,
.docs-article pre {
  margin: 0 0 1rem;
}

.docs-article ul,
.docs-article ol {
  padding-left: 1.25rem;
}

.docs-article li + li {
  margin-top: 0.35rem;
}

.docs-article a {
  color: var(--blue-strong);
}

.docs-article code {
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(177, 186, 196, 0.12);
  font-family: "SFMono-Regular", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
}

.docs-article pre {
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.docs-article pre code {
  padding: 0;
  background: transparent;
}

.docs-article blockquote {
  padding-left: 12px;
  border-left: 3px solid var(--orange);
  color: var(--text-muted);
}

.docs-article hr {
  margin: 1.4rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 1024px) {
  .gh-global-inner,
  .gh-repo {
    width: min(100%, calc(100% - 24px));
  }

  .gh-global-search {
    display: none;
  }

  .gh-repo-header {
    flex-direction: column;
  }

  .gh-repo-header-actions {
    width: 100%;
  }

  .grid-3,
  .stats-grid,
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .gh-stat-grid {
    grid-template-columns: 1fr;
  }

  .schedule-save-button {
    width: 100%;
  }

  .docs-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 34dvh) minmax(0, 1fr);
    height: calc(100dvh - 246px);
    min-height: 0;
  }

  .docs-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

}
