:root {
  --ink: #15231d;
  --ink-2: #37423c;
  --muted: #6e756f;
  --line: #dedbd4;
  --line-strong: #c7d3c9;
  --paper: #f8f6f1;
  --surface: #fffdf8;
  --surface-soft: #f1eee7;
  --forest: #194d3a;
  --forest-2: #0f3a2b;
  --forest-soft: #dbeade;
  --amber: #c98b17;
  --blue: #2b78bc;
  --red: #a65335;
  --shadow: 0 20px 50px rgba(34, 39, 34, 0.08);
  --topbar: 58px;
  --topbar-row: 58px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(25, 77, 58, 0.045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(180deg, rgba(25, 77, 58, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

svg {
  height: 1em;
  width: 1em;
}

.svg-sprite,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: minmax(210px, 260px) 1fr auto;
  align-items: center;
  min-height: var(--topbar-row);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  min-height: var(--topbar-row);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--forest);
}

.primary-nav {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  height: var(--topbar-row);
  overflow-x: auto;
  scrollbar-width: none;
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: var(--ink-2);
  font-size: 14px;
  white-space: nowrap;
}

.nav-link.active,
.nav-link:focus-visible,
.nav-link:hover {
  color: var(--forest);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 2px;
  background: var(--forest);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: var(--topbar-row);
  border-left: 1px solid var(--line);
}

.icon-button,
.profile-button,
.text-button,
.ghost-button,
.primary-button,
.secondary-button,
.view-all-button {
  border: 0;
  color: var(--ink);
  background: transparent;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--ink-2);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.has-count span {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: white;
  background: var(--forest);
  font-size: 10px;
  font-weight: 700;
}

.auth-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  min-height: var(--topbar-row);
  padding: 0 16px;
  border-left: 1px solid var(--line);
}

.auth-control .avatar {
  flex: 0 0 auto;
}

.auth-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.auth-copy strong,
.auth-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-copy strong {
  font-size: 12px;
}

.auth-copy small {
  color: var(--muted);
  font-size: 11px;
}

.auth-control button {
  min-height: 34px;
  border: 1px solid var(--forest);
  border-radius: 6px;
  padding: 0 12px;
  color: white;
  background: linear-gradient(180deg, var(--forest), var(--forest-2));
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
}

.auth-control button.secondary-auth {
  color: var(--forest);
  background: transparent;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  min-height: var(--topbar-row);
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.profile-button svg {
  color: var(--muted);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #6b5c43;
  background: #e3d8c7;
  font-size: 12px;
  font-weight: 700;
}

.profile-copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.profile-copy strong {
  font-size: 12px;
}

.profile-copy small {
  color: var(--muted);
  font-size: 11px;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(680px, 1fr) minmax(320px, 360px);
  min-height: calc(100svh - var(--topbar));
}

.library-wall {
  position: sticky;
  top: var(--topbar);
  height: calc(100svh - var(--topbar));
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #d7cec0;
}

.library-wall img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workspace {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.78);
}

.public-nav {
  display: none;
}

.public-landing {
  display: none;
  padding: 32px 36px 28px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(25, 77, 58, 0.09), rgba(43, 120, 188, 0.06) 44%, rgba(255, 253, 248, 0.92) 45%),
    rgba(255, 253, 248, 0.9);
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 32px;
  align-items: stretch;
}

.public-copy {
  max-width: 760px;
}

.brand-chip {
  display: inline-grid;
  place-items: center;
  min-width: 92px;
  min-height: 40px;
  margin-bottom: 18px;
  border: 1px solid rgba(25, 77, 58, 0.28);
  background: var(--forest);
  color: #fffdf8;
  font-size: 15px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.public-hero h1 {
  margin: 10px 0 12px;
  max-width: 640px;
  font-size: 48px;
  font-weight: 420;
  line-height: 1.02;
}

.public-hero p,
.admin-section p,
.access-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.public-hero p {
  max-width: 680px;
  font-size: 16px;
}

.auth-gateway {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 270px;
  padding: 24px;
  border: 1px solid rgba(25, 77, 58, 0.22);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.auth-gateway-mark {
  width: 42px;
  height: 42px;
  color: var(--forest);
}

.auth-gateway h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.auth-gateway p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.public-inventory {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(25, 77, 58, 0.18);
}

.public-skill-list {
  display: grid;
  gap: 10px;
}

.public-skill-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(25, 77, 58, 0.24);
  background: rgba(255, 253, 248, 0.92);
}

.public-skill-card .skill-icon {
  width: 42px;
  height: 42px;
}

.public-skill-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 13px;
}

.public-skill-card .pill {
  grid-column: 2;
  justify-self: start;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  border: 1px solid var(--line);
  background: var(--line);
}

.access-panel {
  display: grid;
  gap: 9px;
  min-height: 148px;
  padding: 18px;
  background: rgba(255, 253, 248, 0.86);
}

.access-panel svg {
  width: 24px;
  height: 24px;
  color: var(--forest);
}

.access-panel strong {
  font-size: 15px;
}

.hosted-auth.signed-out .app-shell {
  display: block;
  min-height: calc(100svh - var(--topbar));
}

.hosted-auth.signed-out .workspace {
  border-right: 0;
}

.hosted-auth.signed-out .library-wall,
.hosted-auth.signed-out .detail-panel,
.hosted-auth.signed-out .inventory-surface,
.hosted-auth.signed-out .operations-strip,
.hosted-auth.signed-out .request-section,
.hosted-auth.signed-out .report-section,
.hosted-auth.signed-out .admin-section {
  display: none;
}

.hosted-auth.signed-out .public-landing {
  display: block;
}

.hosted-auth.signed-out .public-nav {
  display: inline-flex;
}

.hosted-auth.signed-out .private-nav {
  display: none;
}

.inventory-surface {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.inventory-brief {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--line);
}

.inventory-brief div {
  display: grid;
  gap: 5px;
}

.inventory-brief strong {
  font-size: 22px;
  font-weight: 480;
}

.inventory-brief p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.inventory-brief .secondary-button {
  flex: 0 0 auto;
  min-height: 38px;
}

.search-card {
  display: grid;
  gap: 18px;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 0 18px;
  border: 1px solid #2e8b57;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 0 0 4px rgba(46, 139, 87, 0.06),
    var(--shadow);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.search-box:focus-within {
  border-color: var(--forest);
  box-shadow:
    0 0 0 5px rgba(25, 77, 58, 0.12),
    var(--shadow);
  transform: translateY(-1px);
}

.search-box svg {
  width: 30px;
  height: 30px;
  color: #1c2521;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #30342f;
  background: transparent;
  font-size: 28px;
  font-weight: 340;
}

.search-box kbd {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #faf9f6;
  font-size: 11px;
  font-family: inherit;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.filter-grid label,
.sort-label,
.request-form label {
  display: grid;
  gap: 5px;
}

.filter-grid span,
.sort-label span,
.request-form span {
  color: var(--ink-2);
  font-size: 11px;
}

.filter-grid select,
.sort-label select,
.request-form input,
.request-form select,
.request-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
}

.filter-grid select,
.sort-label select,
.request-form input,
.request-form select {
  min-height: 44px;
  padding: 0 12px;
}

.request-form textarea {
  resize: vertical;
  padding: 12px;
}

.ghost-button,
.text-button,
.view-all-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-size: 13px;
}

.filter-button {
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink-2);
  white-space: nowrap;
}

.table-controls {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.table-controls p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sort-label {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
}

.sort-label select {
  min-height: 30px;
  border: 0;
  background: transparent;
}

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

.table-head,
.table-row {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) minmax(130px, 1fr) minmax(120px, 0.85fr) minmax(150px, 1fr) minmax(92px, 0.7fr);
  align-items: center;
  min-width: 890px;
}

.table-head {
  min-height: 54px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.skill-rows {
  display: grid;
}

.table-row {
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.4);
  text-align: left;
  transition:
    background 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

.table-row:hover,
.table-row:focus-visible,
.table-row.selected {
  position: relative;
  z-index: 2;
  background: rgba(241, 248, 242, 0.86);
  box-shadow: inset 0 0 0 1px rgba(25, 77, 58, 0.55);
}

.table-row:hover {
  transform: translateY(-1px);
}

.skill-cell {
  display: grid;
  grid-template-columns: 22px 36px 1fr;
  gap: 10px;
  align-items: center;
  padding-right: 14px;
}

.star {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.star.active {
  color: var(--forest);
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--forest);
  background: #fbfaf6;
  font-size: 12px;
  font-weight: 760;
}

.skill-icon img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.skill-name {
  display: grid;
  gap: 2px;
}

.skill-name strong {
  color: #17251f;
  font-size: 13px;
}

.skill-name small,
.cell-muted {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.skill-name small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.status-production-ready,
.status-required {
  background: #218451;
}

.status-team-review {
  background: var(--amber);
}

.status-experimental {
  background: #9a9a8d;
}

.status-deprecated {
  background: var(--red);
}

.view-all-button {
  margin-top: 14px;
  padding: 6px 0;
  color: var(--forest);
}

.view-all-button svg {
  transform: rotate(-90deg);
}

.operations-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.governance-flow,
.queue-panel,
.request-section,
.report-section,
.documentation-section {
  padding: 24px 28px;
}

.queue-panel {
  border-left: 0;
}

.governance-flow {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--line);
}

.approved-panel {
  border-left: 1px solid var(--line);
}

.section-kicker {
  color: #232c27;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.governance-flow ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.governance-flow li {
  position: relative;
  display: grid;
  gap: 7px;
  color: var(--ink);
}

.governance-flow li + li::before {
  content: "";
  position: absolute;
  top: 17px;
  right: calc(100% + 5px);
  width: 34px;
  height: 1px;
  background: var(--muted);
}

.governance-flow li span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #b8b0a3;
  border-radius: 50%;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 720;
}

.governance-flow strong,
.queue-item strong {
  font-size: 12px;
}

.governance-flow p,
.request-section p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.queue-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.queue-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.queue-item .skill-icon {
  width: 30px;
  height: 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 5px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 11px;
}

.pill.team-review {
  color: #7a5008;
  background: #fbefcf;
}

.pill.experimental {
  color: #625f55;
  background: #eeebe4;
}

.pill.deprecated {
  color: #823f28;
  background: #f2ddd5;
}

.request-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(300px, 1fr);
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 242, 0.72);
}

.request-section h2,
.report-section h2 {
  margin: 9px 0 10px;
  max-width: 460px;
  font-size: clamp(26px, 3vw, 44px);
  font-weight: 350;
  line-height: 1.05;
}

.request-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wide-field {
  grid-column: 1 / -1;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 5px;
  padding: 0 18px;
  font-weight: 640;
}

.primary-button {
  color: white;
  background: linear-gradient(180deg, var(--forest), var(--forest-2));
}

.secondary-button {
  border: 1px solid var(--forest);
  color: var(--forest);
  background: transparent;
}

.request-form .primary-button {
  justify-self: start;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(420px, 1fr);
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.metric {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  background: rgba(255, 253, 248, 0.76);
}

.metric strong {
  font-size: 32px;
  font-weight: 360;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-section {
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 242, 0.72);
}

.admin-section h2 {
  margin: 8px 0 7px;
  font-size: 30px;
  font-weight: 420;
  line-height: 1.1;
}

.admin-invite-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) auto;
  gap: 12px;
  align-items: end;
  margin-top: 20px;
}

.admin-invite-form label {
  display: grid;
  gap: 5px;
}

.admin-invite-form span {
  color: var(--ink-2);
  font-size: 11px;
}

.admin-invite-form input,
.admin-invite-form select,
.admin-user-row select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.admin-status {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.admin-users {
  display: grid;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(110px, 0.6fr) minmax(130px, 0.7fr) minmax(220px, auto);
  gap: 12px;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.admin-user-row strong,
.admin-user-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-row small {
  color: var(--muted);
  font-size: 11px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-actions button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 0 10px;
  color: var(--forest);
  background: rgba(255, 253, 248, 0.74);
  font-size: 12px;
  font-weight: 680;
}

.admin-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.documentation-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0;
}

.documentation-section a {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 18px 0;
  border-right: 1px solid var(--line);
}

.documentation-section a:last-child {
  border-right: 0;
}

.documentation-section svg {
  width: 24px;
  height: 24px;
  color: var(--forest);
}

.documentation-section span {
  display: grid;
  gap: 4px;
}

.documentation-section small {
  color: var(--muted);
}

.detail-panel {
  position: sticky;
  top: var(--topbar);
  align-self: start;
  display: grid;
  gap: 24px;
  min-height: calc(100svh - var(--topbar));
  padding: 30px 22px;
  background: rgba(255, 253, 248, 0.86);
}

.detail-breadcrumb {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-title {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: center;
}

.detail-title .skill-icon {
  width: 48px;
  height: 48px;
  border-color: rgba(25, 77, 58, 0.25);
  color: white;
  background: var(--forest);
}

.detail-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 520;
  line-height: 1.1;
}

.detail-meta,
.detail-list {
  display: grid;
  gap: 14px;
}

.detail-description {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

.meta-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--ink-2);
  font-size: 13px;
}

.meta-row span:first-child {
  color: var(--muted);
}

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

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #ebe8e1;
  font-size: 11px;
}

.detail-actions {
  display: grid;
  gap: 10px;
}

.detail-actions .primary-button,
.detail-actions .secondary-button {
  width: 100%;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--forest);
  font-size: 13px;
}

.empty-state {
  padding: 36px 0;
  color: var(--muted);
  font-size: 14px;
}

.empty-state.auth-gate {
  display: grid;
  gap: 10px;
  align-content: center;
  min-height: 240px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.empty-state.auth-gate strong {
  color: var(--ink);
  font-size: 18px;
}

.modal-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(21, 35, 29, 0.24);
  backdrop-filter: blur(10px);
}

.modal-backdrop.hidden {
  display: none;
}

.install-dialog {
  position: relative;
  width: min(620px, 100%);
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(15, 33, 26, 0.22);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.install-dialog h2 {
  margin: 8px 0 8px;
  font-size: 30px;
  font-weight: 360;
}

.install-dialog p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.target-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.install-project {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.install-project span {
  color: var(--muted);
  font-size: 11px;
}

.install-project input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fffdf8;
}

.target-tab {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 12px;
  color: var(--ink-2);
  background: #f6f3ec;
}

.target-tab.active {
  border-color: var(--forest);
  color: white;
  background: var(--forest);
}

pre {
  overflow-x: auto;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #cdd7ce;
  border-radius: 6px;
  color: #163527;
  background: #eef4ed;
  font-size: 13px;
  line-height: 1.55;
}

.install-result {
  margin-top: -6px;
  border-color: #d9cfbd;
  background: #faf7ef;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.hidden {
  display: none !important;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.toast {
  position: fixed;
  z-index: 70;
  right: 22px;
  bottom: 22px;
  max-width: min(440px, calc(100vw - 44px));
  padding: 13px 16px;
  border: 1px solid rgba(25, 77, 58, 0.28);
  border-radius: 7px;
  color: white;
  background: var(--forest);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.compact .table-head,
.compact .table-row {
  grid-template-columns: minmax(240px, 1.8fr) minmax(140px, 1fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr);
}

.compact .table-head span:nth-child(3),
.compact .table-head span:nth-child(5),
.compact .table-row > span:nth-child(3),
.compact .table-row > span:nth-child(5) {
  display: none;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  }

  .library-wall {
    display: none;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .brand span {
    display: none;
  }
}

@media (max-width: 1120px) {
  .primary-nav {
    gap: 4px;
  }

  .nav-link {
    padding: 0 8px;
    font-size: 13px;
  }

  .nav-link.active::after {
    right: 7px;
    left: 7px;
  }

  .icon-button {
    width: 42px;
  }

  .auth-control {
    min-width: 174px;
    padding: 0 12px;
  }
}

@media (max-width: 980px) {
  :root {
    --topbar: calc(var(--topbar-row) + 46px);
  }

  .topbar {
    grid-template-columns: auto 1fr;
  }

  .primary-nav {
    order: 3;
    grid-column: 1 / -1;
    width: 100%;
    height: 46px;
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.96);
  }

  .topbar-actions {
    border-left: 0;
  }

  .app-shell {
    display: block;
  }

  .detail-panel {
    position: static;
    min-height: auto;
    border-top: 1px solid var(--line);
  }

  .operations-strip,
  .request-section,
  .report-section,
  .documentation-section,
  .access-grid,
  .admin-invite-form {
    grid-template-columns: 1fr;
  }

  .queue-panel,
  .documentation-section a {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

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

  .filter-button {
    justify-content: start;
  }

  .governance-flow ol {
    grid-template-columns: repeat(2, 1fr);
  }

  .governance-flow li + li::before {
    display: none;
  }

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

  .admin-user-row {
    grid-template-columns: minmax(0, 1fr) minmax(130px, 0.45fr);
    padding: 12px 0;
  }

  .admin-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-row: 56px;
    --topbar: calc(var(--topbar-row) + 46px);
  }

  .auth-control {
    min-width: 0;
    padding: 0 12px;
    border-left: 0;
  }

  .auth-control button {
    padding: 0 10px;
  }

  .profile-copy,
  .profile-button svg {
    display: none;
  }

  .profile-button {
    min-width: 0;
    padding: 0 12px;
    border-left: 0;
  }

  .inventory-surface,
  .public-landing,
  .governance-flow,
  .queue-panel,
  .request-section,
  .report-section,
  .admin-section,
  .documentation-section,
  .detail-panel {
    padding: 20px;
  }

  .public-hero h1 {
    font-size: 30px;
  }

  .public-hero,
  .public-inventory {
    grid-template-columns: 1fr;
  }

  .auth-gateway {
    min-height: auto;
    gap: 10px;
    padding: 18px;
  }

  .auth-gateway-mark {
    width: 34px;
    height: 34px;
  }

  .brand-chip {
    min-height: 34px;
    margin-bottom: 12px;
  }

  .public-skill-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .public-skill-card .pill {
    grid-column: 2;
    justify-self: start;
  }

  .search-box {
    min-height: 56px;
    gap: 10px;
    padding: 0 14px;
  }

  .inventory-brief {
    display: grid;
    align-items: start;
  }

  .inventory-brief .secondary-button {
    justify-self: start;
  }

  .search-box svg {
    width: 24px;
    height: 24px;
  }

  .search-box input {
    font-size: 22px;
  }

  .search-box kbd {
    display: none;
  }

  .filter-grid,
  .request-form,
  .admin-user-row,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .table-controls {
    display: grid;
  }

  .skill-table {
    overflow: visible;
  }

  .table-head {
    display: none;
  }

  .skill-rows {
    gap: 8px;
  }

  .table-row {
    grid-template-columns: 1fr;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 253, 248, 0.64);
  }

  .table-row > span:nth-child(n + 3) {
    display: none;
  }

  .table-row > span:nth-child(2) {
    padding-left: 68px;
  }

  .governance-flow ol {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    display: grid;
  }
}
