:root {
  font-family: Inter, system-ui, sans-serif;
  color: #202522;
  background: #f8f9f8;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.topbar {
  height: 72px;
  padding: 0 32px;
  background: white;
  border-bottom: 1px solid #e2e5e2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 21px;
}
.topbar span,
.note {
  font-size: 13px;
  color: #727a74;
}
main {
  max-width: 1081px;
  padding: 40px 32px;
  margin: auto;
}
h1 {
  font-size: 30px;
  margin: 0 0 8px;
}
.intro {
  margin: 0 0 28px;
  color: #68716b;
}
input {
  height: 44px;
  width: 100%;
  border: 1px solid #dce1dc;
  border-radius: 14px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  background: white;
  margin-bottom: 14px;
}
#catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
button {
  font: inherit;
  cursor: pointer;
}
.card {
  min-height: 194px;
  border: 1px solid #dce1dc;
  background: white;
  padding: 20px;
  text-align: left;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0 16px;
  color: inherit;
}
.card:hover {
  border-color: #82978a;
}
.icon {
  font-size: 30px;
  line-height: 34px;
  color: #5d7365;
  text-align: center;
}
.card h2 {
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
  font-weight: 700;
}
.card p {
  font-size: 14px;
  line-height: 20px;
  color: #68716b;
  margin: 12px 0 18px;
}
.action {
  grid-column: 2;
  justify-self: end;
  align-self: end;
  font-size: 14px;
  color: #59685e;
}
.note {
  margin-top: 28px;
  line-height: 1.6;
}
dialog {
  border: 1px solid #dce1dc;
  border-radius: 16px;
  padding: 32px;
  width: calc(100% - 32px);
  max-width: 600px;
  color: inherit;
}
dialog::backdrop {
  background: #10201966;
}
dialog h2 {
  text-align: center;
  margin: 8px 0 28px;
  font-size: 28px;
}
dialog p {
  color: #68716b;
  line-height: 1.5;
}
.close {
  float: right;
  background: none;
  border: 0;
  font-size: 26px;
}
.setting {
  border-top: 1px solid #e2e5e2;
  margin-top: 24px;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.setting p {
  font-size: 14px;
  margin: 6px 0;
}
.setting button {
  border: 0;
  border-radius: 20px;
  min-width: 46px;
  height: 26px;
  padding: 3px;
  background: #cbd1cd;
}
.setting button span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 0.15s;
}
.setting button[aria-checked='true'] {
  background: #32724b;
}
.setting button[aria-checked='true'] span {
  transform: translateX(20px);
}
footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
}
footer button {
  border: 0;
  background: #254f36;
  color: white;
  border-radius: 8px;
  padding: 10px 24px;
}
:focus-visible {
  outline: 2px solid #32724b;
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 850px) {
  #catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  #catalog {
    grid-template-columns: 1fr;
  }
  main {
    padding: 28px 20px;
  }
  .topbar {
    padding: 0 20px;
  }
}
/* Match the source Integrations grid and Instago light theme. */
:root {
  color: #1e1f24;
  background: #f2fbff;
  --border: #d7e4f5;
  --soft: #375476;
  --primary: #0064e5;
}
body {
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 12% 10%, #f1dcffb8, transparent 68%),
    radial-gradient(1100px 640px at 84% 12%, #d0dcff9e, transparent 70%), #f2fbff;
}
.topbar {
  border-color: var(--border);
}
.topbar span,
.note,
.intro,
dialog p,
.card p,
.action {
  color: var(--soft);
}
input {
  border-color: var(--border);
  line-height: 20px;
}
.card {
  border-color: var(--border);
  border-radius: 0;
  grid-template-rows: 1fr auto;
  align-items: start;
  transition: border-color 0.15s;
}
.card:hover {
  border-color: var(--soft);
}
.icon {
  width: 32px;
  height: 32px;
  display: block;
  margin: 1px;
  object-fit: contain;
}
.card p {
  margin: 12px 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.action {
  font-weight: 500;
  line-height: 20px;
}
.card:hover .action {
  color: #1e1f24;
}
#catalog {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  #catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  #catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
dialog {
  max-width: 760px;
  border-color: var(--border);
  padding: 32px;
  box-shadow: 0 12px 40px #16185b1f;
}
dialog h2 {
  font-size: 30px;
  font-weight: 600;
  line-height: 42px;
  margin: 0 32px 24px;
}
.close {
  position: absolute;
  right: 20px;
  top: 16px;
  color: var(--soft);
  width: 32px;
  height: 32px;
  line-height: 1;
}
.setting {
  border-color: var(--border);
}
.setting button {
  flex-shrink: 0;
  width: 46px;
}
.setting button[aria-checked='true'],
footer button {
  background: var(--primary);
}
footer button:hover {
  background: #0054c2;
}
:focus-visible {
  outline-color: var(--primary);
}
@media (prefers-reduced-motion: reduce) {
  .card,
  .setting button span {
    transition: none;
  }
}
/* Dashboard top navigation, adapted from Instago TopbarMenu. */
.topbar {
  position: relative;
  z-index: 10;
  gap: 24px;
  height: 72px;
  padding: 0 32px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.topbar .brand {
  flex-shrink: 0;
  letter-spacing: -0.6px;
  font-size: 22px;
  line-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.topbar .brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
}
#navigation {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}
#navigation a,
#navigation .nav-unavailable {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  text-decoration: none;
  color: var(--soft);
}
#navigation a[aria-current='page'] {
  position: relative;
  color: var(--primary);
}
#navigation a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--primary);
}
#navigation a:hover {
  color: #4c6b89;
}
#navigation .nav-unavailable {
  color: #6f829b;
  cursor: default;
}
#navigation small {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 5px;
  background: #f1f7ff;
  color: #6f829b;
}
.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.preview-badge {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f9fcff;
  font-size: 12px;
}
#nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--soft);
}
@media (max-width: 767px) {
  .topbar {
    padding: 0 20px;
    gap: 12px;
  }
  .preview-badge {
    display: none;
  }
  #nav-toggle {
    display: flex;
  }
  #navigation {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    transform: none;
    height: auto;
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    box-shadow: 0 12px 32px #16185b1f;
  }
  #navigation.is-open {
    display: flex;
  }
  #navigation a,
  #navigation .nav-unavailable {
    height: 44px;
    padding: 0 12px;
    border-radius: 6px;
  }
  #navigation a[aria-current='page'] {
    box-shadow: none;
    background: #f1f7ff;
  }
}
@media (min-width: 768px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .topbar .brand {
    justify-self: start;
  }
  #navigation {
    position: static;
    transform: none;
    align-self: stretch;
  }
  .nav-actions {
    justify-self: end;
  }
}
@media (max-width: 767px) {
  #navigation a[aria-current='page']::after {
    display: none;
  }
}
.skill-instructions {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f9fcff;
}
.skill-instructions h3 {
  margin: 0;
  font-size: 14px;
}
.skill-instructions p {
  font-size: 14px;
  margin: 10px 0 0;
}
.card-wrap {
  position: relative;
}
.card-wrap .card {
  width: 100%;
  height: 100%;
}
.card-wrap .card h2 {
  padding-right: 28px;
}
.edit-skill {
  position: absolute;
  right: 12px;
  top: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: #f1f7ff;
  color: #375476;
  display: grid;
  place-items: center;
}
.edit-skill:hover {
  background: #d7e4f5;
}
#skill-editor {
  width: 94vw;
  max-width: 1200px;
  height: 85vh;
  padding: 0;
  overflow: hidden;
}
#skill-editor[open] {
  display: flex;
  flex-direction: column;
}
#skill-editor header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
#editor-close {
  background: none;
  border: 0;
  color: var(--soft);
  padding: 8px;
}
#monaco-editor {
  flex: 1;
  min-height: 0;
}
#skill-editor footer {
  margin: 0;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  align-items: center;
  gap: 20px;
}
#editor-status {
  margin-right: auto;
  font-size: 13px;
}
#editor-save:disabled {
  opacity: 0.5;
  cursor: default;
}
/* Instago ModalClose: 24px icon, 8px padding, subtle resting opacity. */
.popup-close,
#editor-close.popup-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  opacity: 0.6;
  transition: opacity 0.3s;
  color: var(--soft);
}
.close.popup-close {
  right: 16px;
  top: 12px;
  float: none;
  z-index: 2;
}
.popup-close:hover,
#editor-close.popup-close:hover,
.popup-close:focus-visible {
  opacity: 1;
}
.popup-close img {
  display: block;
  width: 24px;
  height: 24px;
}
.edit-skill img {
  width: 24px;
  height: 24px;
  display: block;
  opacity: 0.75;
}
.edit-skill:hover img {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .popup-close,
  #editor-close.popup-close {
    transition: none;
  }
}
