:root {
  font:
    14px/1.5 system-ui,
    sans-serif;
  color: #19332f;
  background: #f7f9f8;
  --line: #dce5e1;
  --muted: #62756d;
  --green: #19634f;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: inherit;
  padding: 6px 11px;
}
button:hover {
  background: #eef4f0;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.danger {
  color: #a13036;
}
input,
select,
textarea {
  border: 1px solid #cbd8d1;
  border-radius: 4px;
  background: white;
  color: inherit;
  padding: 7px 9px;
  max-width: 100%;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: white;
}
.brand {
  font-size: 21px;
  font-weight: 750;
  margin: 0 10px 24px;
}
.sidebar nav a {
  display: block;
  padding: 6px 10px;
  margin: 2px 0;
  text-decoration: none;
  border-radius: 4px;
}
.sidebar nav a[aria-current="page"] {
  background: #e5efe9;
  font-weight: 650;
}
.nav-heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 20px 10px 6px;
}
.topbar {
  height: 52px;
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  background: white;
}
.content {
  padding: 24px;
  max-width: 1700px;
  margin: auto;
}
.heading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 20px;
}
.heading h1 {
  font-size: 25px;
  margin: 0;
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.muted {
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow: auto;
}
.tabs a {
  padding: 9px 0;
  text-decoration: none;
  white-space: nowrap;
  color: var(--muted);
}
.tabs a[aria-current="page"] {
  color: var(--green);
  border-bottom: 3px solid var(--green);
  font-weight: 650;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}
.toolbar input {
  width: 360px;
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #587163;
  background: #f6f9f7;
  white-space: nowrap;
}
th button {
  border: 0;
  background: none;
  font-size: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 0;
}
th,
td {
  padding: 9px 13px;
  border-bottom: 1px solid #e8eeeb;
}
tr:last-child td {
  border-bottom: 0;
}
td {
  max-width: 360px;
  overflow-wrap: anywhere;
}
td .actions {
  flex-wrap: wrap;
}
td a,
td code,
td .badge {
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}
td .actions > a {
  flex: 0 0 auto;
}
.table-cells table {
  min-width: 910px;
  table-layout: fixed;
}
.table-cells th:nth-child(1) {
  width: 120px;
}
.table-cells th:nth-child(2) {
  width: 260px;
}
.table-cells th:nth-child(3) {
  width: 90px;
}
.table-cells th:nth-child(4) {
  width: 150px;
}
.table-cells th:nth-child(5) {
  width: 180px;
}
.table-cells th:last-child {
  width: 90px;
}
code {
  font-size: 12px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  background: #f5f8f6;
  padding: 10px;
  border-radius: 4px;
}
.badge {
  color: #40584d;
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: #edf1ef;
  font-size: 12px;
  white-space: nowrap;
}
.development,
.blue {
  color: #355e95;
  background: #e8effa;
}
.staging,
.amber {
  color: #875918;
  background: #fff0d9;
}
.production,
.green {
  color: #35653c;
  background: #e7f1e5;
}
.purple {
  color: #71449b;
  background: #f0e9f8;
}
.rose {
  color: #963e5c;
  background: #f9e9ef;
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
}
.facts dt {
  color: var(--muted);
  font-size: 12px;
}
.facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}
.error {
  background: #fff1ef;
  border: 1px solid #efc8c1;
  color: #923d34;
  padding: 12px;
  border-radius: 4px;
  white-space: pre-wrap;
}
.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}
dialog {
  width: min(780px, calc(100vw - 28px));
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0;
  color: inherit;
}
dialog::backdrop {
  background: #163a3355;
}
.dialog-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-header h2 {
  font-size: 19px;
  margin: 0;
}
.form-fields {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.field.full {
  grid-column: 1/-1;
}
.field small {
  color: var(--muted);
  font-size: 11px;
}
.dialog-footer {
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.dialog-error {
  margin: 0 20px 12px;
}
.identity {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.directory a {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 10px;
  top: 10px;
  background: white;
  z-index: 9;
}
#notice {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #173d32;
  color: white;
  border-radius: 5px;
  padding: 10px 16px;
}
#notice:empty {
  display: none;
}
@media (max-width: 750px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand,
  .nav-heading {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  .sidebar nav a {
    white-space: nowrap;
  }
  .content {
    padding: 15px;
  }
  .topbar {
    padding: 12px 15px;
  }
  .facts,
  .form-fields {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbar input {
    width: 100%;
  }
}
.placement-dialog {
  width: min(940px, calc(100vw - 28px));
}
.intent-sections {
  padding: 0 0 16px;
}
.intent-section {
  margin: 0 20px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.intent-section > summary {
  font-weight: 650;
  cursor: pointer;
  margin-bottom: 8px;
}
.intent-row {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding-bottom: 8px;
  margin: 8px 0;
  background: #f8faf9;
}
.intent-row > button {
  margin-left: 20px;
}
.intent-row .form-fields {
  padding: 12px 20px;
}
.nav-toggle {
  font-size: 11px;
  margin: 0 6px 12px;
  padding: 4px 6px;
}
.collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}
.collapsed .brand,
.collapsed .nav-heading {
  display: none;
}
.collapsed .sidebar {
  padding: 12px 5px;
}
.collapsed .nav-toggle {
  font-size: 0;
  width: 36px;
}
.collapsed .nav-toggle:after {
  content: "›";
  font-size: 20px;
}
.collapsed .sidebar nav a {
  text-align: center;
}
.collapsed .sidebar nav a[aria-current="page"] {
  border-left: 3px solid var(--green);
}
@media (max-width: 750px) {
  .nav-toggle {
    display: none;
  }
  .collapsed {
    grid-template-columns: 1fr;
  }
  .collapsed .sidebar nav a {
    text-align: left;
  }
}
.overview-owners {
  margin-top: 20px;
}
.overview-owners h2 {
  font-size: 15px;
  margin: 0;
}
.overview-owners .heading {
  margin-bottom: 8px;
}
.related-section {
  margin-top: 16px;
}
.related-section > summary {
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.related-section > h2 {
  font-size: 16px;
  margin-bottom: 8px;
}
.facts .actions:empty:after {
  content: "Not assigned";
  color: var(--muted);
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border, #ccd8d2);
  padding: 3px 7px;
  min-width: 240px;
  flex: 1;
}
.search-bar input {
  border: 0;
  min-width: 160px;
  flex: 1;
}
.environment-filters {
  display: flex;
  gap: 16px;
  margin: 8px 0;
}
.environment-filters button {
  background: none;
  border: 0;
  padding: 3px 0;
  border-radius: 0;
  color: inherit;
}
.environment-filters button[aria-pressed="true"] {
  border-bottom: 2px solid currentColor;
  font-weight: 700;
}
.filter-tokens {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-tokens button {
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 2px;
}

/* Grid and flex children must be allowed to shrink before their scroll containers. */
.shell,
.shell > *,
.content,
.resource-table,
.related-section,
.table-scroll,
.tabs {
  min-width: 0;
}
.content {
  width: 100%;
}
.table-scroll,
.tabs {
  max-width: 100%;
}
@media (max-width: 750px) {
  .shell,
  .shell.collapsed {
    width: 100%;
    max-width: 100vw;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
  }
  .sidebar,
  .collapsed .sidebar {
    min-width: 0;
    height: auto;
    padding: 6px 10px;
    align-self: start;
  }
  .sidebar nav {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .sidebar nav a {
    flex: 0 0 auto;
    margin: 0;
  }
  .content {
    margin: 0;
    max-width: 100vw;
  }
  .topbar {
    height: auto;
    min-height: 44px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .toolbar,
  .environment-filters {
    flex-wrap: wrap;
  }
  .search-bar {
    min-width: 0;
    width: 100%;
    flex-basis: 100%;
  }
  .search-bar input {
    min-width: 100px;
    width: 100%;
  }
  .facts > div,
  .field,
  .intent-section {
    min-width: 0;
  }
}

/* Documentation keeps the registry shell and adds a quiet topic rail. */
.docs-content {
  padding-top: 28px;
}
.docs-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 720px) 150px;
  gap: 32px;
  align-items: start;
}
.docs-nav,
.docs-toc {
  position: sticky;
  top: 24px;
}
.docs-nav a,
.docs-toc a {
  display: block;
  text-decoration: none;
  padding: 7px 10px;
  border-left: 2px solid transparent;
  color: var(--muted);
}
.docs-nav a[aria-current="page"] {
  border-color: var(--green);
  color: var(--green);
  background: #edf4f0;
  font-weight: 600;
}
.docs-nav a:hover,
.docs-toc a:hover {
  color: var(--green);
  background: #edf4f0;
}
.docs-nav .nav-heading,
.docs-toc .nav-heading {
  margin-top: 0;
}
.docs-nav .nav-heading:not(:first-child) {
  margin-top: 24px;
}
.docs-eyebrow {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.docs-article h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 12px;
}
.docs-lead {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 32px;
}
.docs-article section {
  scroll-margin-top: 24px;
  margin-bottom: 30px;
}
.docs-article h2 {
  font-size: 19px;
  margin: 0 0 10px;
}
.docs-article p,
.docs-article li {
  line-height: 1.8;
}
.docs-article ul {
  padding-left: 22px;
}
.docs-pagination {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 36px;
}
.docs-toc {
  font-size: 12px;
}
@media (max-width: 1250px) {
  .docs-layout {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 24px;
  }
  .docs-toc {
    display: none;
  }
}
@media (max-width: 760px) {
  .docs-layout {
    display: block;
  }
  .docs-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    margin-bottom: 24px;
  }
  .docs-nav .nav-heading {
    width: 100%;
  }
  .docs-nav a {
    padding: 5px 8px;
  }
  .docs-article h1 {
    font-size: 25px;
  }
  .docs-pagination {
    flex-wrap: wrap;
  }
}

.docs-article {
  min-width: 0;
}
.docs-example {
  margin: 18px 0;
  min-width: 0;
}
.docs-example figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #edf4f0;
  color: #19332f;
  border: 1px solid var(--line);
  border-bottom: 0;
  font-size: 12px;
}
.docs-example figcaption span {
  color: #465d53;
}
.docs-example pre {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  line-height: 1.65;
  tab-size: 2;
}
.docs-example code {
  white-space: pre;
  overflow-wrap: normal;
}

.audit-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 16px 0;
}
.audit-filters input,
.audit-filters select {
  width: 180px;
  min-width: 0;
}
.audit-table {
  overflow-x: auto;
  max-width: 100%;
}
.audit-table table {
  min-width: 860px;
}
.audit-table td {
  font-size: 12px;
}
.audit-table time {
  white-space: nowrap;
}
.audit-next {
  display: inline-block;
  margin-top: 12px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: inherit;
  padding: 6px 11px;
  text-decoration: none;
}
.action-link:hover {
  background: #eef4f0;
}
.group-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  max-height: 180px;
  overflow: auto;
}
.group-options label {
  display: flex;
  align-items: center;
  gap: 6px;
}
fieldset.field {
  border: 1px solid var(--line);
  padding: 12px;
  min-width: 0;
}

.group-summary {
  border-bottom: 1px solid var(--line);
  padding: 8px 0 20px;
  margin-bottom: 20px;
}
.selection-rule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.selection-rule > span {
  color: var(--muted);
}
.heading > div:first-child {
  min-width: 0;
}
.heading > .actions {
  flex-shrink: 0;
}

.dependency-toolbar,
.dependency-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dependency-toolbar {
  margin: 12px 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.dependency-toolbar p {
  margin: 0;
}
.dependency-toolbar [aria-pressed="true"] {
  background: var(--green);
  color: white;
}
.dependency-graph {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 12px 0 28px;
}
.dependency-column {
  min-width: 0;
}
.dependency-heading {
  margin-bottom: 16px;
}
.dependency-heading h2 {
  margin: 0;
  font-size: 15px;
}
.dependency-list {
  position: relative;
  display: grid;
  gap: 12px;
}
.dependency-node,
.dependency-focus {
  position: relative;
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  padding: 12px 14px;
  overflow-wrap: anywhere;
  display: block;
  text-decoration: none;
  font-weight: 600;
}
.dependency-node:hover,
.dependency-focus:hover {
  background: #eef5f1;
}
.dependency-focus {
  border-color: var(--green);
  background: #eef5f1;
  text-align: center;
}
.dependency-incoming.has-edges .dependency-list {
  border-right: 1px solid #a5bcb0;
  padding-right: 16px;
}
.dependency-outgoing.has-edges .dependency-list {
  border-left: 1px solid #a5bcb0;
  padding-left: 16px;
}
.dependency-node::after {
  content: "";
  position: absolute;
  width: 17px;
  border-top: 1px solid #a5bcb0;
  top: 50%;
}
.dependency-incoming .dependency-node::after {
  left: 100%;
}
.dependency-outgoing .dependency-node::after {
  right: 100%;
}
.dependency-list::after {
  position: absolute;
  top: 50%;
  color: var(--green);
  width: 48px;
  text-align: center;
  border-top: 1px solid #a5bcb0;
  line-height: 0;
}
.dependency-incoming.has-edges .dependency-list::after {
  content: "→";
  left: 100%;
}
.dependency-outgoing.has-edges .dependency-list::after {
  content: "→";
  right: 100%;
}
@media (max-width: 900px) {
  .dependency-graph {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .dependency-list::after,
  .dependency-node::after {
    display: none;
  }
  .dependency-incoming.has-edges .dependency-list,
  .dependency-outgoing.has-edges .dependency-list {
    border: 0;
    padding: 0;
  }
}
