:root {
  --canvas: #f5f7f8;
  --paper: #ffffff;
  --ink: #103243;
  --text: #3b5662;
  --muted: #71848c;
  --line: #dce4e7;
  --line-strong: #c9d5da;
  --blue: #1377d5;
  --blue-light: #43b8e8;
  --green: #16a36f;
  --green-light: #dff5ea;
  --navy: #0b3447;
  --shadow: 0 18px 45px rgba(9, 48, 66, 0.09);
}

.docs-shell,
.docs-shell * {
  box-sizing: border-box;
}

.docs-shell {
  min-width: 20rem;
  background:
    linear-gradient(rgba(15, 65, 85, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 65, 85, 0.018) 1px, transparent 1px),
    var(--canvas);
  background-size: 32px 32px;
  color: var(--text);
  font-family: "Urbanist", sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

.docs-shell a {
  color: inherit;
}

.docs-shell a:focus-visible,
.docs-shell button:focus-visible,
.docs-shell summary:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 3px;
}

.docs-shell ::selection {
  background: #bfe8fa;
  color: var(--navy);
}

/* Documentation layout */

.docs-layout {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  min-height: calc(100vh - 71px);
}

.docs-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 2rem 1.15rem 3rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
  backdrop-filter: blur(12px);
}

.docs-sidebar-title {
  display: block;
  margin: 0 0 1.4rem;
  padding: 0 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.docs-sidebar-title span {
  margin-right: 0.4rem;
  color: var(--blue-light);
}

.docs-navigation section {
  margin: 0 0 0.7rem;
}

.docs-nav-group h2 {
  margin: 0;
  padding: 0.55rem 0.7rem 0.25rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-nav-group:nth-of-type(2) h2 {
  color: #35a66f;
}

.docs-nav-group:nth-of-type(3) h2 {
  color: #309767;
}

.docs-nav-group:nth-of-type(4) h2 {
  color: #2b895f;
}

.docs-nav-group:nth-of-type(5) h2 {
  color: #267b57;
}

.docs-nav-group:nth-of-type(6) h2 {
  color: #216d4f;
}

.docs-nav-group:nth-of-type(7) h2 {
  color: #1c5f47;
}

.docs-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-navigation li {
  margin: 0.15rem 0;
}

.docs-navigation a {
  position: relative;
  display: block;
  padding: 0.42rem 0.7rem 0.42rem 0.85rem;
  border-radius: 0.35rem;
  color: #48616c;
  font-size: 0.9375rem;
  line-height: 1.3;
  text-decoration: none;
}

.docs-navigation a:hover {
  background: #eef5f8;
  color: var(--blue);
}

.docs-navigation a.is-current {
  background: #e2f2fb;
  color: #075f9c;
  font-weight: 700;
}

.docs-navigation a.is-current::before {
  position: absolute;
  top: 0.43rem;
  bottom: 0.43rem;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--blue-light);
  content: "";
}

.docs-mobile-bar {
  display: none;
}

.docs-main {
  min-width: 0;
}

.docs-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0 2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  backdrop-filter: blur(10px);
}

.docs-breadcrumbs a {
  color: var(--blue);
  text-decoration: none;
}

.docs-breadcrumbs i {
  color: var(--blue-light);
  font-style: normal;
}

.docs-reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 52rem) 13rem;
  justify-content: center;
  gap: 4rem;
  padding: 4.25rem 3rem 6rem;
}

.docs-article {
  min-width: 0;
  color: var(--text);
}

.docs-article > h1 {
  max-width: 19ch;
  margin: 0 0 2rem;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.5rem, 4vw, 3.65rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.docs-article > h1::after {
  display: block;
  width: 4.5rem;
  height: 4px;
  margin-top: 1.35rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--green) 0 65%, var(--blue-light) 65% 100%);
  content: "";
}

.docs-article h2,
.docs-article h3,
.docs-article h4 {
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  line-height: 1.2;
}

.docs-article h2 {
  margin: 3.5rem 0 1.2rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.75rem;
  letter-spacing: -0.025em;
}

.docs-article h3 {
  margin: 2.4rem 0 1rem;
  font-size: 1.3rem;
}

.docs-article p,
.docs-article li {
  color: var(--text);
}

.docs-article p {
  margin: 1rem 0;
}

.main-workflow-diagram {
  position: relative;
  left: calc(50% + 8.5rem);
  width: min(87.5rem, calc(100vw - 24rem));
  max-width: none;
  margin: 1.75rem 0 2.25rem;
  transform: translateX(-50%);
}

.main-workflow-diagram img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(9, 48, 66, 0.08);
}

.docs-article ul,
.docs-article ol {
  padding-left: 1.5rem;
}

.docs-article a {
  color: #087e9e;
  text-decoration-color: rgba(8, 126, 158, 0.3);
  text-underline-offset: 0.16em;
}

.docs-article a:hover {
  color: var(--blue);
  text-decoration-color: currentcolor;
}

.docs-article code,
.docs-article pre,
.docs-article kbd {
  font-family: "IBM Plex Mono", monospace;
}

.docs-article :not(pre) > code {
  padding: 0.12rem 0.35rem;
  border: 1px solid #d5e1e5;
  border-radius: 0.25rem;
  background: #edf3f5;
  color: #145268;
  font-size: 0.84em;
}

.listingblock,
.literalblock {
  margin: 1.5rem 0;
}

.listingblock pre,
.literalblock pre {
  overflow-x: auto;
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1px solid #245167;
  border-radius: 0.5rem;
  background:
    linear-gradient(90deg, rgba(67, 184, 232, 0.1), transparent 32%),
    #092d3f;
  box-shadow: 0 16px 38px rgba(7, 42, 57, 0.13);
  color: #e9f4f7;
  font-size: 0.84rem;
  line-height: 1.6;
}

.listingblock pre code,
.literalblock pre code {
  color: inherit;
}

.tableblock {
  width: 100%;
  margin: 1.5rem 0;
  border-spacing: 0;
  border-collapse: separate;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(14, 56, 74, 0.05);
}

.tableblock th,
.tableblock td {
  padding: 0.7rem 0.8rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.tableblock th:last-child,
.tableblock td:last-child {
  border-right: 0;
}

.tableblock tr:last-child td {
  border-bottom: 0;
}

.tableblock thead {
  background: #e7f3f8;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

.admonitionblock {
  margin: 1.8rem 0;
}

.admonitionblock table {
  width: 100%;
  border: 1px solid #cbe0e9;
  border-spacing: 0;
  border-radius: 0.5rem;
  background: #eff8fb;
}

.admonitionblock td.icon {
  width: 5rem;
  padding: 1rem;
  border-right: 1px solid #cbe0e9;
  color: var(--blue);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
}

.admonitionblock td.icon i::before {
  content: "Note";
  font-style: normal;
}

.admonitionblock.tip td.icon i::before {
  content: "Tip";
}

.admonitionblock.warning td.icon i::before {
  content: "Warning";
}

.admonitionblock td.content {
  padding: 1rem 1.1rem;
  color: #315968;
}

.hdlist1 {
  margin-top: 1.15rem;
  color: var(--ink);
  font-weight: 700;
}

.sect1 > h2 > .anchor,
.sect2 > h3 > .anchor {
  margin-left: -1em;
  padding-right: 0.25em;
  color: var(--blue-light);
  text-decoration: none;
  visibility: hidden;
}

.sect1 > h2:hover > .anchor,
.sect2 > h3:hover > .anchor {
  visibility: visible;
}

.docs-toc {
  position: sticky;
  top: 7rem;
  align-self: start;
  padding-left: 1rem;
  border-left: 1px solid var(--line-strong);
}

.docs-toc > p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-toc li {
  margin: 0.45rem 0;
}

.docs-toc a {
  display: block;
  color: #627781;
  font-size: 0.78rem;
  line-height: 1.35;
  text-decoration: none;
}

.docs-toc a:hover {
  color: var(--blue);
}

.docs-toc .toc-level-2 {
  padding-left: 0.75rem;
}

.docs-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.docs-pagination a {
  display: flex;
  flex-direction: column;
  min-height: 5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  text-decoration: none;
}

.docs-pagination a:hover {
  border-color: #9dcfe4;
  background: #eff8fc;
}

.docs-pagination small {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.docs-pagination strong {
  margin-top: 0.25rem;
  font-family: "Manrope", sans-serif;
  line-height: 1.25;
}

.pagination-next {
  text-align: right;
}

/* Documentation home */

.docs-home .docs-reading-layout {
  display: block;
  max-width: 76rem;
  margin: 0 auto;
}

.docs-home .docs-article > h1 {
  max-width: 15ch;
  font-size: clamp(3.3rem, 6vw, 5.5rem);
  line-height: 0.95;
}

.docs-home .docs-article > h1::before {
  display: block;
  margin-bottom: 1rem;
  color: var(--blue);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.14em;
  content: "CODINAMO / DOCUMENTATION";
}

.docs-home .docs-article > h1::after,
.home-eyebrow {
  display: none;
}

.home-lead {
  max-width: 47rem;
}

.home-lead p {
  font-size: 1.25rem;
}

.home-actions ul {
  display: flex;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.home-actions li {
  margin: 0;
}

.home-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 2.85rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.home-actions li:first-child a {
  border-color: var(--navy);
  background: var(--navy);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.home-actions a::after,
.path-link a::after {
  margin-left: 0.55rem;
  color: var(--blue-light);
  content: "\2192";
}

.path-grid > .content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.path-card {
  min-height: 15rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 30px rgba(12, 53, 70, 0.045);
}

.path-card > .content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
}

.path-card-featured {
  border-color: var(--navy);
  background: var(--navy);
}

.path-index p,
.reference-kicker p {
  margin: 0;
  color: var(--blue);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.11em;
}

.path-card-featured .path-index p,
.path-card-featured .path-link a {
  color: #79cfee;
}

.path-title p {
  margin: 1.7rem 0 0.65rem;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 1.4rem;
  font-weight: 650;
  line-height: 1.15;
}

.path-card-featured .path-title p,
.path-card-featured > .content > .paragraph:not(.path-index):not(.path-title):not(.path-link) p {
  color: #edf7fa;
}

.path-link {
  margin-top: auto;
}

.path-link a {
  font-family: "Manrope", sans-serif;
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
}

.reference-desk > .content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.85fr);
  overflow: hidden;
  border-radius: 0.55rem;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.reference-intro > .content {
  padding: 2rem;
}

.reference-kicker p {
  color: #78cfee;
}

.reference-title p {
  max-width: 16ch;
  color: #ffffff;
  font-family: "Manrope", sans-serif;
  font-size: 1.8rem;
  font-weight: 650;
  line-height: 1.1;
}

.reference-intro > .content > .paragraph:last-child p {
  color: #b9cdd5;
}

.reference-links {
  margin: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.reference-links ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reference-links li {
  display: flex;
  margin: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reference-links a {
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 6rem;
  padding: 1rem;
  color: #e3eef2;
  font-family: "Manrope", sans-serif;
  font-weight: 650;
  text-decoration: none;
}

.reference-links a::after {
  margin-left: auto;
  color: var(--blue-light);
  content: "\2197";
}

@media (max-width: 1180px) {
  .docs-reading-layout {
    grid-template-columns: minmax(0, 52rem);
  }

  .docs-toc {
    display: none;
  }

  .main-workflow-diagram {
    left: 50%;
  }
}

@media (max-width: 900px) {
  .docs-layout {
    display: block;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-mobile-bar {
    position: relative;
    z-index: 10;
    display: block;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
  }

  .docs-mobile-bar > details > summary {
    padding: 0.8rem 1.25rem;
    color: var(--ink);
    cursor: pointer;
    font-family: "Manrope", sans-serif;
    font-size: 0.86rem;
    font-weight: 650;
  }

  .docs-navigation-mobile {
    max-height: 65vh;
    overflow-y: auto;
    padding: 0.5rem 1rem 1.25rem;
    border-top: 1px solid var(--line);
  }

  .docs-breadcrumbs {
    padding: 0 1.25rem;
    overflow: hidden;
    white-space: nowrap;
  }

  .docs-reading-layout {
    padding: 3.25rem 1.5rem 5rem;
  }

  .docs-home .docs-reading-layout {
    padding: 3.25rem 1.5rem 5rem;
  }

  .main-workflow-diagram {
    width: calc(100vw - 3rem);
  }
}

@media (max-width: 650px) {
  .docs-article > h1,
  .docs-home .docs-article > h1 {
    max-width: 100%;
    font-size: clamp(2.65rem, 12vw, 4rem);
  }

  .docs-article h2 {
    font-size: 1.55rem;
  }

  .home-lead p {
    font-size: 1.08rem;
  }

  .home-actions ul {
    align-items: stretch;
    flex-direction: column;
  }

  .home-actions a {
    justify-content: space-between;
    width: 100%;
  }

  .path-grid > .content,
  .reference-desk > .content {
    grid-template-columns: 1fr;
  }

  .path-card {
    min-height: 14rem;
  }

  .reference-links {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .tableblock {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .docs-pagination {
    grid-template-columns: 1fr;
  }

  .pagination-next {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-shell *,
  .docs-shell *::before,
  .docs-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
