/* A restrained editorial system for the ShipFinance.ai Knowledge Center. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color-scheme: light;
}

body.kc-body {
  margin: 0;
  min-height: 100%;
  font-family: var(--kc-sans);
  color: var(--kc-ink);
  background: var(--kc-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--kc-accent);
}

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

/* Header */

.kc-header {
  /* Non-sticky: scrolls away with the page like any other block. Still a
     positioned stacking context (z-index) so its toggle button paints above
     the off-canvas sidebar (1090) whenever both are in view at once. */
  position: relative;
  z-index: 1100;
  background: #000000;
  border-bottom: 0;
}

.kc-header-inner {
  max-width: var(--kc-page-max);
  min-height: 3.25rem;
  margin: 0 auto;
  padding: 0 1.75rem;
  display: grid;
  /* Equal flexible columns on either side of the logo keep it visually
     centered on the bar regardless of the toggle button sitting in column 1. */
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.85rem;
}

.kc-header-logo {
  grid-column: 2;
  justify-self: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #ffffff;
}

.kc-logo-brand {
  font-weight: 700;
}

.kc-logo-suffix {
  font-weight: 300;
}

/* Off-canvas navigation: a persistent hamburger icon that slides in the
   primary nav, mirroring the main site's own nav-toggle / site-header
   pattern instead of an inline nav bar. */

.kc-nav-toggle {
  /* Part of the bar itself (grid column 1), not a floating element — .kc-header
     being a positioned stacking context (z-index 1100) is what keeps it
     clickable above the sidebar (1090) while the bar is in view. */
  grid-column: 1;
  justify-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.kc-nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background: #ffffff;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.kc-nav-toggle:hover span {
  opacity: 0.6;
}

.kc-nav-toggle:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.kc-nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.kc-nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.kc-nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.kc-nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(8, 15, 30, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.kc-nav-scrim.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.kc-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1090;
  width: min(80vw, 18rem);
  padding: 5.5rem 1.75rem 2rem;
  background: #000000;
  box-shadow: none;
  transform: translateX(-100%);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow-y: auto;
}

.kc-sidebar.is-open {
  box-shadow: 12px 0 40px rgba(10, 20, 45, 0.3);
  transform: translateX(0);
}

.kc-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.kc-nav-link {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-decoration: none;
}

.kc-nav-link:hover,
.kc-nav-link:focus-visible {
  color: rgba(255, 255, 255, 0.6);
}

.kc-nav-link[aria-current='page'] {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Main */

.kc-main {
  max-width: var(--kc-page-max);
  margin: 0 auto;
  padding: 4.5rem 1.75rem 6rem;
}

.kc-eyebrow,
.kc-section-label {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kc-accent);
}

.kc-breadcrumbs {
  margin-bottom: 3rem;
  font-size: 0.76rem;
  color: var(--kc-ink-muted);
}

.kc-breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
}

.kc-breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin-left: 0.45rem;
  color: #a0a8b4;
}

.kc-breadcrumbs a {
  color: var(--kc-ink-muted);
  text-decoration: none;
}

.kc-breadcrumbs a:hover {
  color: var(--kc-ink);
}

.kc-breadcrumbs li[aria-current='page'] {
  color: var(--kc-ink);
}

/* Landing hero */

.kc-hero {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 0 4rem;
  text-align: center;
}

.kc-hero h1 {
  margin: 0;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: clamp(2.8rem, 6vw, 4.75rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.05em;
  color: var(--kc-navy);
}

.kc-hero-lede {
  margin: 1rem 0 2.5rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--kc-ink-muted);
}

.kc-search {
  position: relative;
  max-width: 36rem;
  margin: 0 auto;
  text-align: left;
}

.kc-search-control {
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  padding: 0 0.35rem 0 1rem;
  border: 1px solid #bdbdb9;
  border-radius: 2px;
  background: #ffffff;
}

.kc-search input[type='search'] {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 0.9rem 0;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--kc-ink);
  background: transparent;
}

.kc-search input[type='search']::placeholder {
  color: #7e8795;
}

.kc-search button {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--kc-ink);
  cursor: pointer;
}

.kc-search button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.kc-search-control:focus-within {
  border-color: #171716;
  box-shadow: 0 0 0 1px #171716;
}

.kc-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.45rem);
  right: 0;
  left: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 20rem;
  overflow-y: auto;
  border: 1px solid var(--kc-border);
  background: var(--kc-bg);
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.1);
}

.kc-search-results:empty {
  display: none;
}

.kc-search-results li + li {
  border-top: 1px solid var(--kc-border);
}

.kc-search-results a {
  display: block;
  padding: 0.75rem 0.9rem;
  color: var(--kc-ink);
  text-decoration: none;
}

.kc-search-results a:hover {
  background: var(--kc-bg-tint);
}

.kc-search-results a:focus-visible {
  outline: 1px solid var(--kc-ink);
  outline-offset: -1px;
  background: var(--kc-bg-tint);
}

/* Editorial sections and lists */

.kc-section {
  margin: 2rem 0 0;
}

.kc-section-heading {
  display: grid;
  grid-template-columns: minmax(10rem, 0.85fr) 2.15fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.75rem;
}

.kc-section-heading h2,
.kc-section > h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.035em;
  color: var(--kc-navy);
}

.kc-section-label {
  margin-top: 0.55rem;
}

.kc-article-list,
.kc-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--kc-ink);
}

.kc-page-landing .kc-section {
  max-width: 64rem;
  margin: 0 auto;
}

.kc-page-landing .kc-section > h2 {
  margin-bottom: 1.25rem;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.035em;
  text-align: center;
}

.kc-page-landing .kc-article-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--kc-ink);
}

.kc-page-landing .kc-article-list-item--compact {
  border-bottom: 1px solid var(--kc-ink);
}

.kc-page-landing .kc-article-list-item--compact + .kc-article-list-item--compact {
  border-left: 1px solid var(--kc-border);
}

.kc-article-list-item--compact .kc-article-link {
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
}

.kc-article-list-item--compact .kc-card-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

.kc-article-list-item--compact .kc-read-link {
  margin-top: auto;
  color: var(--kc-ink);
}

.kc-article-list-item,
.kc-topic {
  border-bottom: 1px solid var(--kc-border);
}

.kc-article-link {
  display: grid;
  grid-template-columns: minmax(10rem, 0.85fr) 1.15fr 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 1.5rem 0;
  color: inherit;
  text-decoration: none;
}

.kc-card-eyebrow {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--kc-accent);
}

.kc-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--kc-ink);
  overflow-wrap: anywhere;
}

.kc-card-excerpt {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--kc-ink-muted);
}

.kc-read-link {
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--kc-ink);
}

.kc-article-link:hover .kc-card-title,
.kc-article-link:focus-visible .kc-card-title,
.kc-topic-link:hover .kc-topic-title,
.kc-topic-link:focus-visible .kc-topic-title {
  color: var(--kc-accent);
}

.kc-topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kc-topic:nth-child(odd) {
  border-right: 1px solid var(--kc-border);
}

.kc-topic-link {
  min-height: 5.25rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem 1rem 0;
  color: inherit;
  text-decoration: none;
}

.kc-topic:nth-child(even) .kc-topic-link {
  padding-left: 1.25rem;
}

.kc-topic-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--kc-ink);
}

.kc-topic-count {
  font-size: 0.7rem;
  color: var(--kc-ink-muted);
}

.kc-topic-arrow {
  color: var(--kc-accent);
}

.kc-empty-state {
  max-width: 34rem;
  margin: 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--kc-ink);
  border-bottom: 1px solid var(--kc-border);
  color: var(--kc-ink-muted);
}

/* Section pages */

.kc-section-hero {
  max-width: 48rem;
  margin-bottom: 3rem;
}

.kc-section-hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.05em;
  color: var(--kc-navy);
}

.kc-page-section .kc-article-list {
  margin-top: 1rem;
}

.kc-browse-index-link {
  margin: 0;
  padding-top: 2.5rem;
  font-size: 0.85rem;
}

.kc-browse-index-link a {
  color: var(--kc-ink);
  font-weight: 600;
}

/* Topics index */

.kc-topics-jumplinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0 0 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--kc-ink);
  font-size: 0.78rem;
}

.kc-topics-jumplinks a {
  color: var(--kc-ink-muted);
  text-decoration: none;
}

.kc-topics-jumplinks a:hover,
.kc-topics-jumplinks a:focus-visible {
  color: var(--kc-accent);
}

.kc-topics-group {
  margin: 0 0 2.75rem;
  scroll-margin-top: 5.5rem;
}

.kc-topics-group h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--kc-border);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--kc-navy);
}

.kc-topics-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

.kc-topic-index-item {
  padding: 0.4rem 0;
  font-size: 0.88rem;
  break-inside: avoid;
}

.kc-topic-index-link {
  color: var(--kc-ink);
  font-weight: 500;
}

.kc-topic-index-item--pending {
  color: var(--kc-ink-muted);
}

.kc-topic-index-tag {
  font-style: italic;
}

/* Article */

.kc-article {
  max-width: var(--kc-article-max);
  margin: 0 auto;
}

.kc-article-header {
  padding-bottom: 2rem;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid var(--kc-ink);
}

.kc-article-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5vw, 3.7rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.05em;
  color: var(--kc-navy);
}

.kc-article-meta {
  margin: 0;
  font-size: 0.76rem;
  color: var(--kc-ink-muted);
}

.kc-article .kc-section {
  margin: 3rem 0;
}

.kc-article .kc-section h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.025em;
  color: var(--kc-ink);
}

.kc-article .kc-section h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1rem;
}

.kc-article .kc-section p,
.kc-article .kc-section li {
  font-size: 0.97rem;
  color: var(--kc-ink);
}

.kc-article .kc-section ul,
.kc-article .kc-section ol {
  padding-left: 1.35rem;
}

.kc-article .kc-section a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.kc-article pre {
  max-width: 100%;
  overflow-x: auto;
}

.kc-executive-summary {
  padding: 0 0 0 1.5rem;
  border-left: 3px solid var(--kc-accent);
}

.kc-related {
  padding-top: 2rem;
  border-top: 1px solid var(--kc-ink);
}

.kc-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kc-related-list li {
  border-bottom: 1px solid var(--kc-border);
}

.kc-related-list a {
  display: block;
  padding: 0.8rem 0;
  font-weight: 600;
  text-decoration: none;
}

.kc-button {
  display: inline-flex;
  padding: 0.7rem 1.1rem;
  background: var(--kc-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.kc-not-found {
  text-align: center;
  padding: 4rem 0;
}

/* Footer */

.kc-footer {
  border-top: 1px solid var(--kc-border);
  background: var(--kc-bg);
}

.kc-footer-inner {
  max-width: var(--kc-page-max);
  min-height: 7rem;
  margin: 0 auto;
  padding: 2rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.kc-footer-brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
}

.kc-footer-brand {
  font-style: italic;
  text-decoration: none;
  color: var(--kc-navy);
}

.kc-footer-meta {
  color: var(--kc-ink-muted);
  text-decoration: none;
}

.kc-footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.kc-footer-link {
  font-size: 0.7rem;
  color: var(--kc-ink-muted);
  text-decoration: none;
}

.kc-footer-link:hover,
.kc-footer-link:focus-visible {
  color: var(--kc-accent);
}

@media (max-width: 48rem) {
  .kc-header-inner {
    min-height: 3rem;
    padding: 0 1.25rem;
  }

  .kc-main {
    padding: 3rem 1.25rem 4.5rem;
  }

  .kc-topics-group-list {
    columns: 1;
  }

  .kc-hero {
    padding: 1.75rem 0 3rem;
  }

  .kc-hero h1 {
    font-size: 2.7rem;
    letter-spacing: -0.045em;
  }

  .kc-section {
    margin-top: 3.75rem;
  }

  .kc-page-landing .kc-section {
    margin-top: 0;
  }

  .kc-page-landing .kc-article-list {
    grid-template-columns: 1fr;
  }

  .kc-page-landing .kc-article-list-item--compact + .kc-article-list-item--compact {
    border-left: 0;
  }

  .kc-article-list-item--compact .kc-article-link {
    min-height: auto;
    padding: 1.2rem 0;
  }

  .kc-section-heading {
    display: block;
    margin-bottom: 1.25rem;
  }

  .kc-section-label {
    margin: 0 0 0.55rem;
  }

  .kc-article-link {
    display: block;
    padding: 1.25rem 0;
  }

  .kc-card-eyebrow {
    margin: 0 0 0.35rem;
  }

  .kc-card-excerpt {
    margin-top: 0.5rem;
  }

  .kc-read-link {
    display: inline-block;
    margin-top: 0.75rem;
  }

  .kc-topic-list {
    grid-template-columns: 1fr;
  }

  .kc-topic:nth-child(odd) {
    border-right: 0;
  }

  .kc-topic:nth-child(even) .kc-topic-link,
  .kc-topic-link {
    padding: 1rem 0;
  }

  .kc-breadcrumbs {
    margin-bottom: 2rem;
  }

  .kc-article-title {
    font-size: 2.2rem;
    overflow-wrap: anywhere;
  }

  .kc-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
