.icl-library {
  --icl-border: #d7dfeb;
  --icl-ink: #142033;
  --icl-muted: #5b687a;
  --icl-accent: #0f6fbf;
  --icl-accent-soft: #eaf5ff;
  --icl-surface: #ffffff;
  --icl-surface-alt: #f5f8fc;
  --icl-width: min(calc(100vw - 48px), 1480px);
  color: var(--icl-ink);
  width: 100%;
  max-width: none;
  margin-inline: auto;
}

body.icl-standalone-page {
  background:
    radial-gradient(circle at top left, rgba(15, 111, 191, 0.12), transparent 32%),
    linear-gradient(180deg, #eff5fb 0%, #f7fafc 100%);
  margin: 0;
}

.icl-shell {
  min-height: 100vh;
  padding: 24px;
}

.icl-shell__main {
  width: min(100%, 1480px);
  margin: 0 auto;
}

.wp-block-post-content > .icl-library,
.entry-content > .icl-library {
  width: 100%;
  max-width: none;
}

@media (min-width: 900px) {
  .wp-block-post-content > .icl-library,
  .entry-content > .icl-library {
    width: var(--icl-width);
    max-width: var(--icl-width);
    margin-left: calc((var(--icl-width) - 100%) / -2);
    margin-right: calc((var(--icl-width) - 100%) / -2);
  }
}

.icl-library * {
  box-sizing: border-box;
}

.icl-hero {
  background:
    radial-gradient(circle at right top, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(135deg, #163252 0%, #0f6fbf 100%);
  border: 0;
  border-radius: 28px;
  box-shadow: 0 24px 50px rgba(14, 38, 63, 0.16);
  color: #fff;
  overflow: hidden;
  padding: 34px 38px;
  margin-bottom: 24px;
  position: relative;
}

.icl-hero::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.icl-eyebrow {
  color: var(--icl-accent);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.icl-hero .icl-eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.icl-hero h1,
.icl-vessel-lock h1,
.icl-sidebar__header h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.18;
}

.icl-viewer-header h2 {
  margin: 0 0 10px;
  line-height: 1.22;
}

.icl-hero p:last-child {
  margin-bottom: 0;
}

.icl-vessel-card h2 {
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 14px 0 0;
}

.icl-vessel-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.icl-vessel-card {
  background: var(--icl-surface);
  border: 1px solid var(--icl-border);
  border-radius: 22px;
  color: inherit;
  display: block;
  min-height: 170px;
  padding: 22px;
  position: relative;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.icl-vessel-card::after {
  content: "\2192";
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: #7d8ca1;
  font-size: 1.1rem;
  transition: transform 160ms ease, color 160ms ease;
}

.icl-vessel-card:hover {
  border-color: #a6c8e8;
  box-shadow: 0 18px 35px rgba(15, 111, 191, 0.1);
  transform: translateY(-2px);
}

.icl-vessel-card:hover::after {
  color: var(--icl-accent);
  transform: translateX(2px);
}

.icl-vessel-card__meta,
.icl-vessel-card__lock {
  color: var(--icl-muted);
  display: inline-block;
  font-size: 0.9rem;
}

.icl-vessel-card__lock {
  background: var(--icl-accent-soft);
  border-radius: 999px;
  margin-top: 12px;
  padding: 4px 10px;
}

.icl-vessel-shell {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: start;
}

.icl-vessel-shell--locked {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

.icl-vessel-lock,
.icl-sidebar,
.icl-viewer-panel,
.icl-empty-state {
  background: var(--icl-surface);
  border: 1px solid var(--icl-border);
  border-radius: 22px;
}

.icl-vessel-lock,
.icl-empty-state {
  padding: 32px;
}

.icl-sidebar {
  padding: 24px;
}

.icl-sidebar__header {
  border-bottom: 1px solid var(--icl-border);
  margin-bottom: 18px;
  padding-bottom: 18px;
}

.icl-breadcrumbs {
  align-items: center;
  color: var(--icl-muted);
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.icl-breadcrumbs a {
  color: var(--icl-accent);
  text-decoration: none;
}

.icl-nav-group,
.icl-tree {
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.icl-folder {
  background: var(--icl-surface-alt);
  border-radius: 16px;
  padding: 6px 10px;
}

.icl-folder summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding: 8px 2px;
}

.icl-folder summary::-webkit-details-marker {
  display: none;
}

.icl-folder__children {
  display: grid;
  gap: 8px;
  padding: 0 0 8px 12px;
}

.icl-nav-link {
  background: #fff;
  border: 1px solid transparent;
  border-radius: 14px;
  color: inherit;
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  word-break: break-word;
}

.icl-nav-link:hover {
  background: var(--icl-accent-soft);
  border-color: #c7def2;
}

.icl-nav-link.is-active {
  background: #123c67;
  border-color: #123c67;
  color: #fff;
}

.icl-viewer-panel {
  display: grid;
  gap: 18px;
  padding: 24px 24px 28px;
  align-self: start;
}

.icl-viewer-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px 20px;
}

.icl-viewer-header > :first-child {
  min-width: 0;
}

.icl-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.icl-button {
  background: #123c67;
  border: 1px solid #123c67;
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: 0.95rem;
  padding: 10px 16px;
  text-decoration: none;
}

.icl-button--secondary {
  background: #fff;
  color: #123c67;
}

.icl-viewer-frame {
  background: linear-gradient(180deg, #edf3f9 0%, #f7fafc 100%);
  border: 1px solid #dbe5f0;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 18px;
}

.icl-viewer-document {
  width: min(100%, 980px);
  aspect-ratio: 210 / 297;
}

.icl-viewer-frame iframe {
  background: #fff;
  border: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(20, 32, 51, 0.12);
}

.icl-password-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.icl-password-form input,
.icl-password-form button {
  border-radius: 14px;
  font: inherit;
  padding: 12px 14px;
}

.icl-password-form input {
  border: 1px solid var(--icl-border);
}

.icl-password-form button {
  background: #123c67;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.icl-alert {
  border-radius: 14px;
  margin-top: 16px;
  padding: 12px 14px;
}

.icl-alert--error {
  background: #fff1f2;
  color: #b91c1c;
}

.icl-tree-empty {
  color: var(--icl-muted);
  margin: 0;
}

@media (max-width: 980px) {
  .icl-vessel-shell {
    grid-template-columns: 1fr;
  }

  .icl-viewer-document {
    width: 100%;
  }

  .icl-viewer-frame iframe {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .icl-viewer-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .icl-viewer-actions {
    justify-content: flex-start;
  }
}
