/* NoteDrifter website: Docs pages. */

.docs-page { min-height: 100vh; background: #000; }
.docs-layout {
  display: grid; grid-template-columns: 260px minmax(0, 820px); justify-content: center; gap: clamp(42px, 6vw, 94px);
  width: min(1320px, 100%); margin: 0 auto; padding: calc(var(--header-h) + 34px) clamp(22px, 4vw, 56px) 84px;
}

/* ----------------------------------------------------------------- sidebar */
.docs-sidebar {
  position: sticky; top: calc(var(--header-h) + 22px); align-self: start; max-height: calc(100vh - var(--header-h) - 40px);
  overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.docs-nav > summary {
  display: flex; align-items: center; justify-content: space-between; padding: 10px 12px;
  list-style: none; cursor: pointer; font: 400 19px/1.2 var(--display); color: #fff;
}
.docs-nav > summary::-webkit-details-marker { display: none; }
.docs-nav > summary::after {
  content: ''; width: 12px; height: 12px; background: var(--soft); transition: rotate .8s var(--spring);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.docs-nav[open] > summary::after { rotate: 180deg; }
.docs-nav nav { display: flex; flex-direction: column; gap: 18px; padding: 6px 0 16px; }
.docs-nav-group { display: grid; gap: 2px; }
.docs-nav-group h2 { margin: 0 0 6px; padding-left: 12px; font: 400 13px/1.3 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--soft); }
.docs-nav a {
  position: relative; display: block; padding: 7px 12px; border-radius: 10px;
  font-size: 17px; line-height: 1.35; color: var(--muted);
  transition: color .24s, background-color .24s;
}
.docs-nav a::before { /* the app's key-light: a short glowing bar beside the current page */
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px;
  background: #fff; box-shadow: 0 0 8px #fff, 0 0 18px rgba(255, 255, 255, .55);
  opacity: 0; scale: 1 0; transition: scale .9s var(--spring), opacity .4s;
}
.docs-nav a:hover { color: #fff; background-color: rgba(255, 255, 255, .06); }
.docs-nav a.current { color: #fff; background-color: rgba(255, 255, 255, .1); }
.docs-nav a.current::before { opacity: 1; scale: 1 1; }
.docs-home-link { margin-bottom: 2px; }

/* -------------------------------------------------------------- article */
.docs-main { min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 16px; color: var(--soft); }
.breadcrumbs a { transition: color .4s; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs [aria-current=page] { color: var(--muted); }
.docs-heading { padding: 26px 0 38px; }
.docs-eyebrow { margin: 0 0 14px; font: 400 14px/1.2 var(--display); letter-spacing: .26em; color: var(--soft); }
.docs-heading h1 { margin: 0 0 14px; font: 400 clamp(46px, 5.6vw, 70px)/1.06 var(--display); text-shadow: 0 0 16px rgba(255, 255, 255, .28); }
.docs-summary { max-width: 720px; margin: 0; font-size: 22px; line-height: 1.5; color: var(--muted); }

.docs-main section { position: relative; padding: 34px 0; }
.docs-main > section::before, .docs-main section:not(.guide-group, .quick-start)::before { /* hairline that fades at both ends */
  content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .06) 70%, transparent);
}
.docs-main section h2 { margin: 0 0 14px; font: 400 clamp(29px, 3.5vw, 40px)/1.18 var(--display); }
.docs-main section p, .docs-main section li { font-size: 19px; line-height: 1.68; color: var(--text); }
.docs-main section p { margin: 0 0 16px; }
.docs-main section p:last-child { margin-bottom: 0; }
.docs-main section strong { font-weight: 500; color: #fff; }
.docs-main section ol, .docs-main section ul { margin: 16px 0; padding-left: 26px; }
.docs-main section li { margin: 0 0 10px; padding-left: 6px; }
.docs-main section li::marker { font-family: var(--display); color: var(--soft); }
.docs-main section :is(p, li, td) a {
  color: #fff; padding-bottom: 1px;
  background: linear-gradient(#fff, #fff) 0 100% / 100% 1px no-repeat, linear-gradient(rgba(255, 255, 255, .35), rgba(255, 255, 255, .35)) 0 100% / 100% 1px no-repeat;
  background-size: 0 1px, 100% 1px; transition: background-size .7s var(--out);
}
.docs-main section :is(p, li, td) a:hover { background-size: 100% 1px, 100% 1px; }
.docs-main code, .docs-main kbd { font: 14px/1.5 var(--mono); color: #fff; white-space: nowrap; }
.docs-main code { padding: 2px 7px; border: 1px solid var(--hairline); border-radius: 6px; background: rgba(255, 255, 255, .05); }
.docs-main kbd {
  display: inline-block; min-width: 26px; padding: 1px 7px; text-align: center;
  border: 1px solid rgba(255, 255, 255, .3); border-bottom-width: 2px; border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}

.table-wrap { margin: 18px 0; overflow-x: auto; border: 1px solid var(--hairline); border-radius: 16px; background: rgba(255, 255, 255, .02); }
.docs-main table { width: 100%; border-collapse: collapse; text-align: left; font-size: 17px; }
.docs-main th, .docs-main td { padding: 13px 18px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
.docs-main tr:last-child td { border-bottom: 0; }
.docs-main th { font: 400 14px/1.3 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--soft); background: rgba(255, 255, 255, .03); }
.docs-main td { color: var(--text); }
.docs-main td:first-child { min-width: 130px; color: #fff; }
.docs-main tbody tr { transition: background-color .35s; }
.docs-main tbody tr:hover { background-color: rgba(255, 255, 255, .035); }

/* ----------------------------------------------------------- docs home */
.docs-home-content { display: grid; gap: 52px; }
.docs-main .quick-start {
  position: relative; overflow: hidden; padding: 30px 32px; border: 1px solid var(--line); border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015));
}
.quick-start h2 { margin: 0 0 10px !important; }
.quick-start p { margin: 0 0 22px !important; max-width: 560px; }
.quick-start-link { font-size: 19px; }
.guide-group > h2 { margin: 0 0 18px !important; }
.docs-main .guide-group { padding: 0; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-card {
  display: flex; flex-direction: column; min-height: 168px; padding: 20px 22px;
  border: 1px solid var(--hairline); border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
}
.guide-card:hover { --zoom: 1.025; border-color: rgba(255, 255, 255, .4); box-shadow: 0 22px 44px rgba(0, 0, 0, .55), 0 0 30px rgba(216, 215, 221, .12); }
.guide-card > span:first-child { font: 400 24px/1.25 var(--display); color: #fff; }
.guide-card p { margin: 8px 0 14px; font-size: 17px; line-height: 1.5; color: var(--muted); }
.guide-card .guide-card-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; font-size: 16px; color: var(--text); transition: color .24s; }
.guide-card .guide-card-cta::after { content: '→'; font-family: var(--body); transition: translate .36s var(--out); }
.guide-card:hover .guide-card-cta { color: #fff; }
.guide-card:hover .guide-card-cta::after { translate: 6px 0; }

/* --------------------------------------------------------- page footer */
.docs-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 40px 0 0; }
.docs-pagination a {
  display: flex; flex-direction: column; gap: 6px; min-height: 86px; padding: 18px 20px;
  border: 1px solid var(--hairline); border-radius: 18px;
}
.docs-pagination a:hover { --zoom: 1.02; border-color: rgba(255, 255, 255, .42); }
.docs-pagination a:last-child { align-items: flex-end; text-align: right; }
.docs-pagination span { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--soft); }
.docs-pagination a[rel=prev] span::before { content: '←'; }
.docs-pagination a[rel=next] span::after { content: '→'; }
.docs-pagination a span::before, .docs-pagination a span::after { transition: translate .36s var(--out); }
.docs-pagination a[rel=prev]:hover span::before { translate: -4px 0; }
.docs-pagination a[rel=next]:hover span::after { translate: 4px 0; }
.docs-pagination strong { font: 400 23px/1.2 var(--display); color: #fff; }
.article-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--hairline); }
.article-footer a {
  font-size: 17px; color: var(--text); padding-bottom: 2px;
  background: linear-gradient(#fff, #fff) 0 100% / 0 1px no-repeat; transition: color .4s, background-size .7s var(--out);
}
.article-footer a:hover { color: #fff; background-size: 100% 1px; }

/* -------------------------------------------------------------- skeleton */
html.docs-loading, html.docs-loading body { overflow: hidden; }
.docs-skeleton {
  position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: var(--header-h) 1fr; background: #000;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .45s ease, visibility 0s linear .45s;
}
html.docs-loading .docs-skeleton { opacity: 1; visibility: visible; transition-delay: 0s; }
.docs-skeleton-header { display: flex; align-items: center; gap: 12px; padding: 0 clamp(16px, 3vw, 44px); border-bottom: 1px solid var(--hairline); }
.docs-skeleton-header > img { display: block; width: 35px; height: 30px; object-fit: contain; opacity: .8; }
.skeleton-wordmark, .skeleton-nav i, .skeleton-line {
  display: block; border-radius: 6px;
  background: linear-gradient(105deg, rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, .13) 50%, rgba(255, 255, 255, .05) 70%) 0 0 / 250% 100%;
  animation: sheen 1.6s linear infinite;
}
.skeleton-wordmark { width: 142px; height: 19px; }
.skeleton-nav { display: flex; align-items: center; gap: clamp(24px, 4vw, 56px); margin-left: auto; }
.skeleton-nav i { width: 48px; height: 13px; }
.skeleton-nav i:nth-child(2) { width: 38px; } .skeleton-nav i:nth-child(3) { width: 58px; } .skeleton-nav i:nth-child(4) { width: 42px; }
.docs-skeleton-layout {
  display: grid; grid-template-columns: 260px minmax(0, 820px); justify-content: center; gap: clamp(42px, 6vw, 94px);
  width: min(1320px, 100%); margin: 0 auto; padding: 34px clamp(22px, 4vw, 56px) 80px;
}
.docs-skeleton-layout aside { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.skeleton-line { height: 13px; width: 76%; }
.skeleton-wide { width: 94%; height: 16px; margin-bottom: 8px; } .skeleton-medium { width: 69%; } .skeleton-short { width: 54%; margin-bottom: 8px; }
.skeleton-crumb { width: 35%; height: 12px; margin: 0 0 35px; } .skeleton-eyebrow { width: 17%; height: 12px; margin-bottom: 17px; }
.skeleton-title { width: 69%; height: 55px; margin-bottom: 17px; border-radius: 8px; } .skeleton-summary { width: 88%; height: 18px; margin-bottom: 56px; }
.skeleton-rule { display: block; height: 1px; width: 100%; margin: 0 0 38px; background: var(--hairline); }
.skeleton-section-title { width: 38%; height: 32px; margin-bottom: 18px; } .skeleton-paragraph { width: 100%; height: 14px; margin-bottom: 12px; } .skeleton-paragraph-short { width: 72%; margin-bottom: 37px; }

/* ------------------------------------------------------------------ narrow */
@media (max-width: 900px) {
  .docs-layout, .docs-skeleton-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 30px; padding-inline: 28px; }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .docs-layout { display: flex; flex-direction: column; gap: 18px; padding: calc(var(--header-h) + 14px) 20px 60px; }
  .docs-sidebar { position: static; max-height: none; overflow: visible; width: 100%; border-bottom: 1px solid var(--hairline); }
  .docs-nav nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; padding: 12px 0 20px; }
  .docs-nav-group { align-content: start; }
  .docs-home-link { grid-column: 1 / -1; }
  .docs-heading { padding: 22px 0 30px; }
  .docs-heading h1 { font-size: 50px; }
  .docs-summary { font-size: 20px; }
  .docs-main section { padding: 28px 0; }
  .docs-main section p, .docs-main section li { font-size: 18px; }
  .docs-home-content { gap: 40px; }
  .docs-main .quick-start { padding: 24px; }
  .docs-skeleton-layout { display: block; padding: 28px 20px; }
  .docs-skeleton-layout aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-bottom: 45px; }
  .docs-skeleton-layout aside .skeleton-wide { grid-column: 1 / -1; }
}
@media (max-width: 430px) {
  .docs-layout { padding-inline: 16px; }
  .docs-heading h1 { font-size: 42px; }
  .guide-card { padding: 18px; min-height: 150px; }
  .guide-card > span:first-child { font-size: 22px; }
  .article-footer { flex-wrap: wrap; }
  .docs-pagination { grid-template-columns: 1fr; }
  .docs-pagination a:last-child { align-items: flex-start; text-align: left; }
  .docs-skeleton-header { padding-inline: 16px; }
  .skeleton-nav { gap: 12px; } .skeleton-nav i { width: 27px !important; }
}
