.public-content-page {
  min-width: 320px;
  margin: 0;
  background: #f7f9fc;
  color: #17202a;
}

.public-content-shell {
  width: min(1440px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.public-content-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.public-topbar {
  animation: none;
}

.public-topbar .nav-links a[aria-current="page"] {
  background: #ffffff;
  color: #0b57d0;
  box-shadow: 0 1px 4px rgba(16, 36, 61, 0.1);
}

.public-page-hero {
  position: relative;
  min-height: 310px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  padding: 54px 52px;
  background-color: #eef4fb;
}

.public-page-hero > * {
  position: relative;
  z-index: 1;
}

.public-page-hero h1 {
  max-width: 780px;
  margin: 9px 0 0;
  color: #10243d;
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: 0;
}

.public-page-hero > p:not(.section-kicker) {
  max-width: 650px;
  margin: 18px 0 0;
  color: #344054;
  font-size: 16px;
  line-height: 1.75;
}

.models-hero {
  min-height: 260px;
  background-image:
    linear-gradient(
      90deg,
      rgba(247, 250, 255, 0.98) 0%,
      rgba(247, 250, 255, 0.92) 43%,
      rgba(247, 250, 255, 0.38) 70%,
      rgba(247, 250, 255, 0.08) 100%
    ),
    url("/static/assets/sealroute-integrations-fallback.jpg");
  background-position: center, center;
  background-size: cover, cover;
}

.insights-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: 44px;
  background-color: #eef4fb;
  background-image:
    linear-gradient(
      90deg,
      rgba(247, 250, 255, 0.98) 0%,
      rgba(247, 250, 255, 0.92) 52%,
      rgba(247, 250, 255, 0.5) 78%,
      rgba(247, 250, 255, 0.2) 100%
    ),
    url("/static/assets/sealroute-hero-fallback.jpg");
  background-position: center, center;
  background-size: cover, cover;
}

.insights-hero-note {
  border-left: 2px solid #0b57d0;
  padding-left: 20px;
}

.insights-hero-note strong,
.insights-hero-note span {
  display: block;
}

.insights-hero-note strong {
  color: #10243d;
  font-size: 18px;
}

.insights-hero-note span {
  margin-top: 8px;
  color: #475467;
  font-size: 13px;
  line-height: 1.6;
}

.public-directory-section {
  padding: 48px 24px 72px;
}

.public-directory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.public-directory-heading h2 {
  margin: 7px 0 0;
  color: #17202a;
  font-size: 30px;
  letter-spacing: 0;
}

.public-directory-heading p:last-child {
  max-width: 620px;
  margin: 10px 0 0;
  color: #475467;
  line-height: 1.65;
}

.directory-count {
  color: #475467;
  font-size: 13px;
  white-space: nowrap;
}

.directory-count strong {
  color: #10243d;
  font-size: 20px;
}

.directory-controls {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  border-block: 1px solid #dce2ea;
  padding: 18px 0;
}

.directory-view-toggle {
  display: inline-flex;
  width: fit-content;
  gap: 3px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 3px;
  background: #eef3f9;
}

.directory-view-toggle button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 13px;
  background: transparent;
  color: #475467;
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
}

.directory-view-toggle button.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(20, 33, 43, 0.1);
}

.directory-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.directory-control-row > span {
  width: 64px;
  flex: 0 0 auto;
  color: #667085;
  font-size: 12px;
  font-weight: 760;
}

.directory-control-row .filter-group {
  min-width: 0;
  flex-wrap: wrap;
}

.directory-search {
  position: relative;
  width: min(100%, 520px);
}

.directory-search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 42px 10px 14px;
  background: #ffffff;
  color: #17202a;
  font: inherit;
}

.directory-search input:focus {
  border-color: #0b57d0;
  outline: 2px solid rgba(11, 87, 208, 0.18);
  outline-offset: 1px;
}

.directory-search button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #475467;
  cursor: pointer;
  transform: translateY(-50%);
}

.directory-search button:hover {
  background: #eef4fb;
}

.public-model-grid.marketplace-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-model-grid.marketplace-grid.list-view {
  grid-template-columns: minmax(0, 1fr);
}

/* Keep the public directory's list mode as information-dense as the workspace. */
.public-model-grid.marketplace-grid.list-view .model-card {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, 1.15fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 12px 14px;
}

.public-model-grid.marketplace-grid.list-view .model-card-head {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.public-model-grid.marketplace-grid.list-view .model-card > p,
.public-model-grid.marketplace-grid.list-view .model-facts,
.public-model-grid.marketplace-grid.list-view .model-assurance,
.public-model-grid.marketplace-grid.list-view .model-evidence-details {
  display: none;
}

.public-model-grid.marketplace-grid.list-view .model-price {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin-top: 0;
  border: 0;
  padding: 0;
}

.public-model-grid.marketplace-grid.list-view .model-card-footer {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-items: flex-end;
  flex-direction: column;
  margin-top: 0;
  padding-top: 0;
}

.public-model-grid.marketplace-grid.list-view .model-card-footer a {
  margin-left: 0;
}

.public-model-grid .model-card[hidden] {
  display: none;
}

.directory-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.directory-pagination button {
  min-width: 82px;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #1d2939;
  font-weight: 720;
  cursor: pointer;
}

.directory-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.directory-pagination span {
  min-width: 96px;
  color: #475467;
  font-size: 13px;
  text-align: center;
}

.directory-state {
  grid-column: 1 / -1;
  border: 1px dashed #bdc9d8;
  border-radius: 8px;
  padding: 44px 24px;
  background: #ffffff;
  text-align: center;
}

.directory-state strong,
.directory-state span {
  display: block;
}

.directory-state strong {
  color: #17202a;
  font-size: 18px;
}

.directory-state span {
  margin-top: 8px;
  color: #667085;
}

.directory-state button {
  margin-top: 18px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.insight-card {
  display: flex;
  min-height: 304px;
  flex-direction: column;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  padding: 24px;
  background: #ffffff;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.insight-card:hover {
  border-color: #9cb9e8;
  box-shadow: 0 12px 30px rgba(32, 45, 72, 0.08);
  transform: translateY(-2px);
}

.insight-card > span {
  color: #007f73;
  font-size: 12px;
  font-weight: 780;
}

.insight-card h2 {
  margin: 14px 0 0;
  color: #10243d;
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: 0;
}

.insight-card p {
  margin: 12px 0 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.7;
}

.insight-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
  color: #667085;
  font-size: 12px;
}

.insight-card footer strong {
  color: #0b57d0;
  font-size: 13px;
}

.insight-card-skeleton {
  min-height: 304px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent),
    #edf1f6;
  background-size: 220% 100%, auto;
  animation: public-skeleton 1.2s ease-in-out infinite;
}

@keyframes public-skeleton {
  from { background-position: 180% 0, 0 0; }
  to { background-position: -80% 0, 0 0; }
}

.public-footer {
  margin-top: 30px;
}

.insight-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) minmax(240px, 300px);
  justify-content: center;
  gap: 64px;
  padding: 70px 24px 40px;
}

.insight-article {
  min-width: 0;
}

.insight-back {
  display: inline-flex;
  color: #0b57d0;
  font-size: 13px;
  font-weight: 740;
}

.insight-article > header {
  margin-top: 28px;
  border-bottom: 1px solid #dce2ea;
  padding-bottom: 32px;
}

.insight-article h1 {
  margin: 12px 0 0;
  color: #10243d;
  font-size: 44px;
  line-height: 1.2;
  letter-spacing: 0;
}

.insight-lead {
  margin: 20px 0 0;
  color: #344054;
  font-size: 18px;
  line-height: 1.75;
}

.insight-meta,
.insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 20px;
  color: #667085;
  font-size: 12px;
}

.insight-tags {
  gap: 8px;
  margin-top: 14px;
}

.insight-tags span {
  border: 1px solid #d5deea;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8fafc;
  color: #475467;
}

.insight-body {
  padding-top: 14px;
}

.insight-body section {
  padding: 24px 0;
}

.insight-body section + section {
  border-top: 1px solid #e4e9f0;
}

.insight-body h2 {
  margin: 0 0 16px;
  color: #17202a;
  font-size: 25px;
  letter-spacing: 0;
}

.insight-body p {
  margin: 0;
  color: #344054;
  font-size: 16px;
  line-height: 1.9;
}

.insight-body p + p {
  margin-top: 15px;
}

.insight-sources ul {
  margin: 0;
  padding-left: 20px;
}

.insight-sources li + li {
  margin-top: 8px;
}

.insight-sources a {
  color: #0b57d0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.insight-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  border-block: 1px solid #b9cee9;
  padding: 24px 0;
}

.insight-cta span,
.insight-cta strong {
  display: block;
}

.insight-cta span {
  color: #667085;
  font-size: 12px;
}

.insight-cta strong {
  margin-top: 5px;
  color: #10243d;
}

.insight-related {
  position: sticky;
  top: 104px;
  align-self: start;
  border-top: 2px solid #0b57d0;
  padding-top: 16px;
}

.insight-related > span {
  color: #667085;
  font-size: 12px;
  font-weight: 780;
}

.insight-related a {
  display: block;
  border-bottom: 1px solid #dce2ea;
  padding: 18px 0;
}

.insight-related a span,
.insight-related a strong {
  display: block;
}

.insight-related a span {
  color: #007f73;
  font-size: 11px;
}

.insight-related a strong {
  margin-top: 7px;
  color: #17202a;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 1240px) {
  .public-content-shell {
    width: min(100vw - 28px, 1140px);
  }
}

@media (max-width: 1040px) {
  .public-content-shell {
    width: min(100vw - 28px, 1140px);
  }

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

  .insight-article-layout {
    grid-template-columns: minmax(0, 760px);
  }

  .insight-related {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }

  .insight-related > span {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .public-content-shell {
    width: min(100vw - 28px, 1140px);
    padding-top: 10px;
  }

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

  .public-topbar .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    overflow-x: auto;
  }

  .public-topbar .nav-actions .tonal-button {
    display: none;
  }

  .public-page-hero {
    min-height: 280px;
    padding: 34px 24px;
  }

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

  .insights-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .public-directory-section {
    padding: 42px 8px 60px;
  }

  .public-directory-heading,
  .directory-control-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-control-row > span {
    width: auto;
  }

  .public-model-grid.marketplace-grid,
  .insight-grid,
  .insight-related {
    grid-template-columns: 1fr;
  }

  .public-model-grid.marketplace-grid.list-view .model-card {
    grid-template-columns: 1fr;
  }

  .public-model-grid.marketplace-grid.list-view .model-card-head,
  .public-model-grid.marketplace-grid.list-view .model-price,
  .public-model-grid.marketplace-grid.list-view .model-card-footer {
    grid-column: 1;
    grid-row: auto;
  }

  .public-model-grid.marketplace-grid.list-view .model-card-footer {
    align-items: flex-start;
    flex-direction: row;
    padding-top: 10px;
  }

  .directory-view-toggle {
    width: 100%;
  }

  .directory-view-toggle button {
    flex: 1 1 0;
  }

  .insight-article-layout {
    padding: 46px 8px 30px;
  }

  .insight-article h1 {
    font-size: 34px;
  }

  .insight-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .insight-card,
  .insight-card-skeleton {
    transition: none;
    animation: none;
  }
}
