:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #656d76;
  --faint: #8c959f;
  --border: #d0d7de;
  --border-muted: #d8dee4;
  --header: #20252b;
  --header-muted: #afb8c1;
  --accent: #0969da;
  --taskset: #0969da;
  --taskset-soft: #ddf4ff;
  --environment: #1a7f37;
  --environment-soft: #dafbe1;
  --artifact: #9a6700;
  --artifact-soft: #fff8c5;
  --danger: #cf222e;
  --shadow: 0 1px 0 rgba(31, 35, 40, 0.04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 0.84rem; letter-spacing: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(280px, 1fr) minmax(0, 1.5fr);
  align-items: center;
  min-height: 64px;
  padding: 0 28px;
  color: #fff;
  background: var(--header);
  border-bottom: 1px solid #171a1e;
}

.brand { display: inline-flex; align-items: center; justify-self: start; gap: 8px; color: #fff; font-weight: 650; }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.05rem; }
.brand-product { color: var(--header-muted); font-weight: 500; }
.brand-mark, .login-mark { display: inline-grid; grid-template-columns: repeat(3, 4px); align-items: end; gap: 3px; width: 20px; height: 21px; }
.brand-mark span, .login-mark span { display: block; width: 4px; background: currentColor; border-radius: 1px; }
.brand-mark span:nth-child(1), .login-mark span:nth-child(1) { height: 11px; }
.brand-mark span:nth-child(2), .login-mark span:nth-child(2) { height: 18px; }
.brand-mark span:nth-child(3), .login-mark span:nth-child(3) { height: 14px; }

.registry-topnav { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.registry-topnav a { padding: 7px 10px; color: var(--header-muted); border-radius: 5px; font-size: 0.82rem; font-weight: 550; white-space: nowrap; }
.registry-topnav a:hover { color: #fff; background: #30363d; text-decoration: none; }

.account-area { display: flex; align-items: center; justify-self: end; min-width: 0; gap: 8px; color: #fff; font-size: 0.82rem; }
.account-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-area form { margin-left: 6px; }
.account-area button { padding: 4px 8px; color: var(--header-muted); background: transparent; border: 0; font-size: 0.78rem; }
.account-area button:hover { color: #fff; }
.account-link { padding: 4px 6px; color: var(--header-muted); font-weight: 550; white-space: nowrap; }
.account-link:hover { color: #fff; text-decoration: none; }

.app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); width: min(1320px, 100%); min-height: calc(100vh - 112px); margin: 0 auto; }
.sidebar { padding: 26px 20px 40px; border-right: 1px solid var(--border-muted); }
.sidebar-section { margin-top: 30px; }
.sidebar-label { margin: 18px 10px 8px; color: var(--muted); font-size: 0.7rem; font-weight: 650; text-transform: uppercase; }
.sidebar-section .sidebar-label { margin-top: 0; }
.nav-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 37px; padding: 6px 10px; color: var(--text); font-size: 0.86rem; border-radius: 6px; }
.nav-item:hover { background: #eef1f4; text-decoration: none; }
.nav-item.active { color: var(--text); background: #eaeef2; font-weight: 600; }
.nav-primary { min-height: 43px; margin-bottom: 2px; font-weight: 620; }
.nav-primary.active { color: #0550ae; background: var(--taskset-soft); }
.nav-count { color: var(--muted); font-size: 0.72rem; }
.namespace-avatar { display: inline-grid; place-items: center; width: 20px; height: 20px; color: #fff; background: #6e7781; border-radius: 4px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }

.resource-glyph { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 3px; width: 38px; height: 38px; padding: 8px 7px; border: 1px solid; border-radius: 5px; }
.resource-glyph.large { width: 46px; height: 46px; padding: 10px 9px; }
.resource-glyph.taskset { color: var(--taskset); background: var(--taskset-soft); border-color: #b6d9f2; }
.resource-glyph.taskset span { display: block; height: 3px; background: currentColor; border-radius: 1px; }
.resource-glyph.taskset span:nth-child(2) { width: 72%; }
.resource-glyph.environment { color: var(--environment); background: var(--environment-soft); border-color: #aceebb; }
.resource-glyph.environment::before { content: ""; position: absolute; top: 7px; right: 6px; left: 6px; height: 3px; border-bottom: 1px solid currentColor; }
.resource-glyph.environment::after { content: ">_"; position: absolute; left: 7px; bottom: 6px; font-family: ui-monospace, monospace; font-size: 0.72rem; font-weight: 700; }
.resource-glyph.artifact { color: var(--artifact); background: var(--artifact-soft); border-color: #eac54f; }
.resource-glyph.artifact::before { content: ""; position: absolute; top: 7px; right: 7px; left: 7px; height: 8px; border: 2px solid currentColor; border-radius: 50%; }
.resource-glyph.artifact::after { content: ""; position: absolute; top: 11px; right: 7px; bottom: 7px; left: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; border-left: 2px solid currentColor; border-radius: 0 0 50% 50%; }

.main-content { min-width: 0; padding: 42px 48px 64px; }
.page-heading, .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-heading { margin-bottom: 24px; padding-bottom: 15px; border-bottom: 1px solid var(--border-muted); }
.eyebrow { margin-bottom: 3px; color: var(--muted); font-size: 0.72rem; font-weight: 650; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: 0; line-height: 1.25; }
h1 { font-size: 1.7rem; font-weight: 650; }
h2 { font-size: 1.08rem; font-weight: 650; }
.result-count { color: var(--muted); font-size: 0.83rem; }

.registry-summary { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); margin: 0 0 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); }
.registry-summary > div { padding: 14px 18px; border-right: 1px solid var(--border-muted); }
.registry-summary > div:last-child { border-right: 0; }
.registry-summary dt { color: var(--muted); font-size: 0.72rem; }
.registry-summary dd { margin: 2px 0 0; font-size: 1.05rem; font-weight: 650; }

.visibility, .kind-label { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 8px; color: #59636e; background: #eff3f6; border: 1px solid #d8dee4; border-radius: 12px; font-size: 0.72rem; line-height: 1.2; }
.kind-label { padding: 0; background: transparent; border-color: transparent; }
.visibility { background: #fff; }
.visibility.prominent { margin-left: auto; }

.root-list { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); }
.root-row { display: grid; grid-template-columns: 40px minmax(220px, 1fr) auto 18px; align-items: center; gap: 14px; min-height: 88px; padding: 15px 18px; border-bottom: 1px solid var(--border-muted); }
.root-row:last-child { border-bottom: 0; }
.root-row:hover { background: #f8fafc; }
.root-main { min-width: 0; }
.root-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.root-name { color: var(--text); font-size: 0.98rem; font-weight: 650; }
.root-name span, .root-header h1 span { color: var(--muted); font-weight: 500; }
.root-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 0.77rem; }
.root-meta code { color: #424a53; }
.separator { width: 3px; height: 3px; background: var(--faint); border-radius: 50%; }
.row-arrow { color: var(--faint); font-size: 1.5rem; }
.label-strip { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.label-strip span { padding: 2px 6px; color: #424a53; background: #f6f8fa; border: 1px solid var(--border-muted); border-radius: 4px; font-size: 0.68rem; }
.label-strip b { font-weight: 650; }

.empty-state { display: grid; justify-items: center; padding: 72px 24px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.empty-state h2 { margin: 18px 0 8px; }

.root-detail { min-width: 0; max-width: 100%; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--muted); font-size: 0.8rem; }
.breadcrumb strong { color: var(--text); font-weight: 550; }
.root-header { display: flex; align-items: center; gap: 14px; margin-bottom: 25px; }
.root-heading-text { min-width: 0; }
.root-header h1 { overflow-wrap: anywhere; }
.tab-bar { display: flex; gap: 24px; border-bottom: 1px solid var(--border); }
.tab-bar a { position: relative; padding: 10px 2px 12px; color: var(--muted); font-size: 0.85rem; font-weight: 550; }
.tab-bar a:hover { color: var(--text); text-decoration: none; }
.tab-bar a.active { color: var(--text); }
.tab-bar a.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: #fd8c73; }
.tab-bar span { margin-left: 3px; padding: 1px 6px; background: #eaeef2; border-radius: 10px; font-size: 0.68rem; }
.detail-section { min-width: 0; max-width: 100%; padding: 30px 0 36px; border-bottom: 1px solid var(--border-muted); }
.detail-section:last-child { border-bottom: 0; }
.section-heading { margin-bottom: 16px; }

.copy-button { min-height: 31px; padding: 5px 11px; color: var(--text); background: #f6f8fa; border: 1px solid var(--border); border-radius: 6px; font-size: 0.76rem; font-weight: 550; box-shadow: var(--shadow); }
.copy-button:hover { background: #eef1f4; }

.version-list, .access-list { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.version-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 54px; padding: 10px 13px; border-bottom: 1px solid var(--border-muted); }
.version-row:last-child { border-bottom: 0; }
.version-row code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-mark { width: 10px; height: 10px; background: var(--taskset-soft); border: 2px solid var(--taskset); border-radius: 50%; }
.access-list > div { display: flex; align-items: center; gap: 11px; min-height: 62px; padding: 10px 14px; border-bottom: 1px solid var(--border-muted); }
.access-list > div:last-child { border-bottom: 0; }
.access-list > div > div { min-width: 0; flex: 1; }
.access-list strong, .access-list small { display: block; }
.access-list strong { font-size: 0.84rem; }
.access-list small { margin-top: 1px; color: var(--muted); font-size: 0.74rem; }
.access-list form { margin: 0; }
.access-list button, .invitation-row button, .label-list button { padding: 4px 8px; color: var(--danger); background: #fff; border: 1px solid var(--border); border-radius: 5px; font-size: 0.7rem; }
.permission-badge { padding: 3px 8px; color: #0550ae; background: var(--taskset-soft); border: 1px solid #b6d9f2; border-radius: 4px; font-size: 0.72rem; font-weight: 650; }
.access-notice { margin-bottom: 12px; padding: 9px 11px; color: #116329; background: var(--environment-soft); border: 1px solid #aceebb; border-radius: 5px; font-size: 0.78rem; }
.global-notice { width: min(1320px, calc(100% - 32px)); margin: 12px auto 0; }
.share-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.6fr) auto; align-items: end; gap: 12px; margin-top: 12px; padding: 14px; background: #f6f8fa; border: 1px solid var(--border); border-radius: 6px; }
.share-form label { color: var(--muted); font-size: 0.7rem; font-weight: 650; }
.share-form input, .share-form select { width: 100%; height: 36px; padding: 5px 8px; background: #fff; border: 1px solid var(--border); border-radius: 5px; }
.share-form > button { height: 36px; padding: 5px 12px; color: #fff; background: var(--accent); border: 1px solid #0550ae; border-radius: 5px; font-size: 0.76rem; font-weight: 650; }
.registry-attestation-list { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.registry-attestation-row { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(240px, 1.2fr) minmax(155px, 0.55fr); align-items: start; gap: 18px; padding: 14px; border-bottom: 1px solid var(--border-muted); }
.registry-attestation-row:last-child { border-bottom: 0; }
.registry-attestation-row > * { min-width: 0; }
.registry-attestation-row > code { overflow-wrap: anywhere; }
.registry-attestation-row > div { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 0.7rem; }
.registry-attestation-row strong { color: var(--text); overflow-wrap: anywhere; font-size: 0.78rem; }
.registry-attestation-row small, .registry-attestation-row span { overflow-wrap: anywhere; }
.registry-attestation-row pre { min-width: 0; max-height: 150px; margin: 0; padding: 9px; overflow: auto; color: #303942; background: #f6f8fa; border: 1px solid var(--border-muted); border-radius: 5px; font-size: 0.7rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.label-list { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.label-list > div { display: grid; grid-template-columns: minmax(140px, 0.4fr) minmax(0, 1fr); min-height: 48px; border-bottom: 1px solid var(--border-muted); }
.label-list > div:last-child { border-bottom: 0; }
.label-list dt, .label-list dd { min-width: 0; margin: 0; padding: 13px 16px; font-size: 0.8rem; overflow-wrap: anywhere; }
.label-list dt { color: #424a53; background: #f6f8fa; border-right: 1px solid var(--border-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.label-list dd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.label-list dd form { flex: 0 0 auto; margin: 0; }
.section-empty { color: var(--muted); }
.section-empty { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-size: 0.82rem; text-align: center; }

.operation-form { display: grid; gap: 13px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.compact-fields { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr); gap: 10px; }
.operation-form label, .standalone-form label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 0.71rem; font-weight: 650; }
.operation-form input, .operation-form select, .operation-form textarea, .standalone-form input, .standalone-form select { width: 100%; min-width: 0; padding: 5px 8px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 5px; }
.operation-form input, .operation-form select, .standalone-form input, .standalone-form select { height: 36px; }
.operation-form textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.45; }
.operation-form > button, .standalone-form > button { justify-self: start; min-height: 35px; padding: 5px 12px; color: #fff; background: var(--accent); border: 1px solid #0550ae; border-radius: 5px; font-size: 0.76rem; font-weight: 650; }

.access-subsection { margin-top: 28px; padding-top: 25px; border-top: 1px solid var(--border-muted); }
.invitation-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 13px; border-bottom: 1px solid var(--border-muted); }
.invitation-row:last-child { border-bottom: 0; }
.invitation-row strong, .invitation-row small { display: block; }
.invitation-row strong { font-size: 0.8rem; }
.invitation-row small { margin-top: 2px; color: var(--muted); font-size: 0.7rem; }
.invitation-row form { margin: 0; }

.standalone-page { display: grid; place-items: start center; min-height: calc(100vh - 112px); padding: 64px 20px; }
.standalone-panel { width: min(560px, 100%); padding: 25px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; box-shadow: var(--shadow); }
.standalone-panel h1 { margin-bottom: 22px; }
.standalone-form { display: grid; gap: 12px; }
.standalone-form > button { margin-top: 4px; }
.secret-output { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 18px 0; padding: 12px; background: #f6f8fa; border: 1px solid var(--border); border-radius: 6px; }
.secret-output code { min-width: 0; overflow-wrap: anywhere; }
.compact-summary { margin: 0 0 24px; }
.compact-summary div { display: grid; grid-template-columns: 90px minmax(0, 1fr); padding: 9px 0; border-bottom: 1px solid var(--border-muted); }
.compact-summary dt { color: var(--muted); font-size: 0.75rem; }
.compact-summary dd { margin: 0; font-size: 0.8rem; }

.admin-section { padding: 28px 0 34px; border-bottom: 1px solid var(--border-muted); }
.admin-section:last-child { border-bottom: 0; }
.admin-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.admin-table { width: 100%; min-width: 620px; border-collapse: collapse; text-align: left; }
.admin-table th { padding: 9px 13px; color: var(--muted); background: #f6f8fa; border-bottom: 1px solid var(--border); font-size: 0.68rem; text-transform: uppercase; }
.admin-table td { padding: 11px 13px; border-bottom: 1px solid var(--border-muted); font-size: 0.78rem; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td code { overflow-wrap: anywhere; }

.login-page { display: grid; place-items: center; min-height: calc(100vh - 112px); padding: 48px 20px; }
.login-panel { width: min(380px, 100%); padding: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; box-shadow: 0 8px 28px rgba(31, 35, 40, 0.08); }
.login-mark { margin-bottom: 22px; color: var(--taskset); transform: scale(1.35); transform-origin: left bottom; }
.login-panel h1 { margin-bottom: 24px; }
.login-panel form { display: grid; }
.login-panel label { margin: 13px 0 6px; color: #424a53; font-size: 0.78rem; font-weight: 600; }
.login-panel input { width: 100%; height: 39px; padding: 7px 10px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 6px; outline: none; }
.login-panel input:focus { border-color: var(--taskset); box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15); }
.login-panel form > button { height: 39px; margin-top: 20px; color: #fff; background: var(--taskset); border: 1px solid #0550ae; border-radius: 6px; font-weight: 620; }
.login-panel form > button:hover { background: #0550ae; }
.login-error { margin-bottom: 8px; padding: 9px 11px; color: var(--danger); background: #ffebe9; border: 1px solid #ff8182; border-radius: 6px; font-size: 0.78rem; }

.footer { display: flex; justify-content: space-between; gap: 20px; min-height: 48px; padding: 14px max(28px, calc((100% - 1264px) / 2)); color: var(--muted); background: var(--surface); border-top: 1px solid var(--border-muted); font-size: 0.74rem; }
.not-found { display: grid; justify-items: center; align-content: center; min-height: calc(100vh - 112px); padding: 40px 24px; text-align: center; }
.not-found .empty-mark { margin-bottom: 24px; }
.not-found h1 { margin-bottom: 10px; }
.not-found code { margin-bottom: 24px; color: var(--muted); }
.primary-link { padding: 7px 13px; color: #fff; background: var(--accent); border-radius: 6px; font-size: 0.82rem; font-weight: 600; }
.primary-link:hover { text-decoration: none; background: #0550ae; }

@media (max-width: 920px) {
  .topbar { grid-template-columns: auto minmax(230px, 1fr); gap: 10px 22px; padding: 10px 18px; }
  .account-area { grid-column: 1 / -1; justify-self: stretch; justify-content: flex-end; flex-wrap: wrap; }
  .app-shell { grid-template-columns: 196px minmax(0, 1fr); }
  .main-content { padding: 34px 28px 54px; }
  .registry-summary { grid-template-columns: repeat(2, 1fr); }
  .registry-summary > div:nth-child(2) { border-right: 0; }
  .registry-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--border-muted); }
  .root-row { grid-template-columns: 40px minmax(0, 1fr) 18px; }
  .root-row > .visibility { display: none; }
  .registry-attestation-row { grid-template-columns: 1fr; gap: 11px; }
}

@media (max-width: 680px) {
  .topbar { position: static; grid-template-columns: 1fr; gap: 11px; padding: 13px 16px 15px; }
  .brand { justify-self: center; }
  .registry-topnav { grid-row: 2; flex-wrap: wrap; }
  .account-area { grid-row: 3; justify-content: center; }
  .account-name { max-width: 100%; }
  .app-shell { display: block; width: 100%; }
  .sidebar { display: flex; gap: 14px; overflow-x: auto; padding: 11px 16px; background: var(--surface); border-right: 0; border-bottom: 1px solid var(--border-muted); }
  .resource-nav, .sidebar-section nav { display: flex; gap: 6px; }
  .sidebar-section { display: flex; align-items: center; gap: 8px; margin: 0; }
  .sidebar-label { display: none; }
  .nav-item { grid-template-columns: 21px auto auto; min-height: 37px; white-space: nowrap; }
  .nav-primary { min-height: 37px; margin: 0; }
  .main-content { width: 100%; padding: 26px 16px 48px; overflow-x: hidden; }
  .page-heading { align-items: flex-start; }
  h1 { font-size: 1.42rem; }
  .registry-summary { margin-bottom: 20px; }
  .registry-summary > div { padding: 12px 13px; }
  .root-row { min-height: 82px; padding: 13px; gap: 10px; }
  .root-title-line { display: block; }
  .kind-label { margin-top: 3px; }
  .breadcrumb { margin-bottom: 22px; overflow-x: auto; white-space: nowrap; }
  .root-header { align-items: flex-start; }
  .visibility.prominent { display: none; }
  .tab-bar { gap: 18px; overflow-x: auto; }
  .section-heading { align-items: flex-start; }
  .label-list > div { display: block; }
  .label-list dt { border-right: 0; border-bottom: 1px solid var(--border-muted); }
  .version-row { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .share-form { grid-template-columns: 1fr; }
  .compact-fields { grid-template-columns: 1fr; }
  .invitation-row { align-items: start; }
  .standalone-page { min-height: calc(100vh - 106px); padding: 32px 16px; }
  .standalone-panel { padding: 21px 18px; box-shadow: none; }
  .footer { padding: 14px 16px; }
  .login-page { min-height: calc(100vh - 106px); padding: 28px 16px; }
  .login-panel { padding: 24px 20px; box-shadow: none; }
}
