/* AI Wireframe Kit — docs (ai.uxkits.com/docs) */
:root {
  --bg:          #F7F7F4;
  --sidebar-bg:  #EBEAE9;
  --paper:       #FFFFFF;
  --ink:         #1E1E1C;
  --mid:         #5C5C56;
  --faint:       #94948C;
  --link:        #627BAD;
  --link-hover:  #4E6688;
  --link-tint:   rgba(98, 123, 173, .11);
  --link-tint-hover: rgba(30, 30, 26, .05);
  --wire:        #D4D4CF;
  --wire-dk:     #B5B5AE;
  --panel:       #FFFFFF;
  --dark:        #1E1E1C;

  --fd: 'Rubik', system-ui, sans-serif;
  --fb: 'Plus Jakarta Sans', system-ui, sans-serif;

  --sidebar-w: 260px;
  --toc-w: 220px;
  --content-max: 50rem;
  --nav-h: 56px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--link-hover); }

/* ─── Site nav (matches marketing feel) ─── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-h);
  padding: 0 24px;
  background: rgba(247, 247, 244, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--wire);
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--fd);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.site-nav__brand:hover { color: var(--ink); }
.nav-mark {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.site-nav__back {
  font-size: 14px;
  font-weight: 600;
  color: var(--mid);
  text-decoration: none;
}
.site-nav__back:hover { color: var(--ink); }

/* ─── Docs shell (3-column grid: nav | main | toc) ─── */
.docs-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - var(--nav-h));
}

.docs-sidebar {
  grid-column: 1;
  position: sticky;
  top: var(--nav-h);
  align-self: start;
  width: var(--sidebar-w);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 28px 16px 48px 24px;
  border-right: 1px solid var(--wire);
  background: var(--sidebar-bg);
}

.docs-menu__summary {
  display: none;
}
.docs-menu > summary::-webkit-details-marker {
  display: none;
}
.docs-sidebar__title {
  font-family: var(--fd);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 10px;
  margin-top: 22px;
}
.docs-sidebar__title:first-child { margin-top: 0; }

.docs-sidebar__title--sub {
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: .1em;
}

.docs-nav a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  padding: 6px 10px;
  margin: 2px 0;
  border-radius: 6px;
  border-left: 3px solid transparent;
}
.docs-nav a:hover {
  color: var(--ink);
  background: var(--link-tint-hover);
}
.docs-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  background: var(--link-tint);
  border-left-color: var(--link);
}

.docs-main-wrap {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.docs-main-wrap:has(.docs-toc) {
  grid-template-columns: minmax(0, 1fr) var(--toc-w);
}

.docs-main {
  grid-column: 1;
  padding: 40px clamp(28px, 5vw, 64px) 80px;
  min-width: 0;
}

.docs-prose {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.docs-prose > * + * { margin-top: 1em; }
.docs-prose h1 {
  font-family: var(--fd);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 0.35em;
}
.docs-prose .lead {
  font-size: 18px;
  color: var(--mid);
  line-height: 1.55;
  margin-bottom: 1.25em;
}
.docs-prose h2 {
  font-family: var(--fd);
  font-size: 22px;
  font-weight: 800;
  margin-top: 2em;
  margin-bottom: 0.5em;
  letter-spacing: -.02em;
}
.docs-prose h3 {
  font-family: var(--fd);
  font-size: 17px;
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.4em;
}
.docs-prose ul, .docs-prose ol {
  padding-left: 1.35em;
}
.docs-prose li + li { margin-top: 0.35em; }
.docs-prose code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.9em;
  background: rgba(30, 30, 26, .06);
  padding: 2px 7px;
  border-radius: 5px;
}
.docs-prose pre {
  background: var(--dark);
  color: var(--paper);
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}
.docs-prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.docs-prose blockquote {
  border-left: 3px solid var(--wire-dk);
  padding-left: 1em;
  color: var(--mid);
  font-style: italic;
}

/* TOC */
.docs-toc {
  grid-column: 2;
  position: sticky;
  top: var(--nav-h);
  align-self: start;
  width: var(--toc-w);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 40px 28px 48px 20px;
  border-left: 1px solid var(--wire);
  background: var(--sidebar-bg);
}
.docs-toc__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
  padding-left: 4px;
}
.docs-toc a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  padding: 5px 0 5px 12px;
  border-left: 2px solid transparent;
}
.docs-toc a:hover { color: var(--ink); }
.docs-toc a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-left-color: var(--link);
}

.docs-toc__section--border {
  margin-top: 1.25em;
  padding-top: 1.25em;
  border-top: 1px solid var(--wire);
}

/* Media suggestion callout */
.callout-media {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px dashed var(--wire-dk);
  background: var(--link-tint-hover);
  margin: 1.25em 0;
}
.callout-media__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--link-tint);
  color: var(--link);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fd);
}
.callout-media__body { font-size: 14px; color: var(--mid); line-height: 1.5; }
.callout-media__body strong { color: var(--ink); }

/* Step flow */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 1.5em 0;
}
.flow-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--wire);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.flow-step span.num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--link);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.flow-arrow {
  color: var(--faint);
  font-size: 18px;
  font-weight: 300;
}

/* Wireframe panels (from marketing hero) */
.wf-stage {
  position: relative;
  margin: 2em 0;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--wire);
  border-radius: 12px;
  overflow: hidden;
}
.wf-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(181, 181, 174, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 181, 174, .16) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: .7;
}

.hp {
  position: relative;
  background: var(--panel);
  border: 1.5px solid var(--wire);
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 4px 28px rgba(30, 30, 26, .08);
  z-index: 1;
}
.hp-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-bottom: 1px solid var(--wire);
  background: var(--sidebar-bg);
}
.hp-d { width: 8px; height: 8px; border-radius: 50%; background: var(--wire); }
.hp-name { margin-left: 5px; font-size: 10px; color: var(--mid); }
.hp-body { padding: 12px; }

.wl { height: 5px; background: var(--wire); border-radius: 3px; margin-bottom: 5px; }
.wb {
  border: 1.5px dashed var(--wire-dk);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  min-height: 36px;
}
.wb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, transparent 0, transparent 7px, rgba(181, 181, 174, .08) 7px, rgba(181, 181, 174, .08) 8px);
}
.wt {
  font-size: 8px;
  color: var(--wire-dk);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  position: relative;
}
.wcard { border: 1.5px solid var(--wire); border-radius: 5px; padding: 8px; }

.wf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.wf-grid-2cols {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 16px;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* Card photo strip visual */
.card-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  margin-top: 8px;
}
.mini-card {
  width: 44px;
  height: 56px;
  border-radius: 4px;
  border: 1.5px solid var(--wire-dk);
  background: var(--panel);
  box-shadow: 0 2px 8px rgba(30, 30, 26, .06);
}
.mini-card.ph::after {
  content: '';
  display: block;
  margin: 8px auto 0;
  width: 70%;
  height: 4px;
  background: var(--wire);
  border-radius: 2px;
}

.label-caption {
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  text-align: center;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.two-col-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 2em 0;
  align-items: stretch;
}
@media (max-width: 720px) {
  .two-col-diagram { grid-template-columns: 1fr; }
}

.badge-note {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  background: var(--panel);
  border: 1px solid var(--wire);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
}

@media (min-width: 1081px) {
  /* Desktop: nav always visible (nav.js sets open=true; this backs it up). */
  .docs-menu .docs-nav {
    display: block;
  }
}

@media (max-width: 1080px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: relative;
    top: 0;
    width: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--wire);
    padding: 20px 24px;
  }
  .docs-main-wrap {
    grid-column: 1;
    grid-template-columns: 1fr;
  }
  .docs-menu {
    border: 1px solid var(--wire);
    border-radius: 10px;
    background: var(--panel);
    overflow: hidden;
  }
  .docs-menu__summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
    border-bottom: 1px solid transparent;
  }
  .docs-menu[open] .docs-menu__summary {
    border-bottom-color: var(--wire);
  }
  .docs-menu__summary:hover {
    background: var(--link-tint-hover);
  }
  .docs-menu__icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    background: rgba(30, 30, 26, .08);
    color: var(--ink);
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
  }
  .docs-menu:not([open]) .docs-nav {
    display: none;
  }
  /* Mobile: restore native details closed behavior. */
  .docs-menu:not([open]) > :not(summary) {
    display: none;
  }
  .docs-menu .docs-nav {
    padding: 8px 10px 12px;
  }
  .docs-toc {
    display: none;
  }
  .docs-main {
    padding: 28px 24px 64px;
  }
}

@media (max-width: 600px) {
  .wf-grid-2cols {
    grid-template-columns: 1fr;
  }
}

.ways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 14px;
  margin: 1.5em 0;
}
.way-card {
  background: var(--panel);
  border: 1px solid var(--wire);
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.way-card:hover {
  border-color: var(--ink);
  box-shadow: 0 4px 20px rgba(30, 30, 26, .06);
  color: inherit;
}
.way-card strong {
  display: block;
  font-family: var(--fd);
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--ink);
}
.way-card span {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.45;
}

.included-list {
  list-style: none;
  padding: 0;
  margin: 1.25em 0;
}
.included-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--wire);
}
.included-list li:last-child { border-bottom: none; }
.included-list .piece {
  font-weight: 600;
  color: var(--ink);
  min-width: 10rem;
}
.included-list .where { font-size: 14px; }
.included-list .where a { font-weight: 500; }

.callout-warm {
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--wire);
  background: var(--panel);
  margin: 1.5em 0;
  font-size: 15px;
  line-height: 1.55;
}
.callout-warm strong { color: var(--ink); }

.callout-feedback {
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--wire);
  border-left: 3px solid var(--link);
  background: var(--link-tint-hover);
  margin: 1.5em 0;
  font-size: 15px;
}
.callout-feedback a { font-weight: 600; }

.product-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 1.5em 0;
}
@media (max-width: 640px) {
  .product-picks { grid-template-columns: 1fr; }
}
.product-pick {
  display: block;
  padding: 20px 22px;
  background: var(--panel);
  border: 1.5px solid var(--wire);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s;
}
.product-pick:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
  color: inherit;
}
.product-pick h3 {
  font-family: var(--fd);
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--ink);
}
.product-pick p {
  font-size: 14px;
  color: var(--mid);
  margin: 0;
  line-height: 1.5;
}

.table-scroll {
  overflow-x: auto;
  margin: 1.25em 0;
  -webkit-overflow-scrolling: touch;
}

.product-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}
.product-compare th,
.product-compare td {
  padding: 12px 14px;
  border: 1px solid var(--wire);
  text-align: left;
  vertical-align: top;
}
.product-compare thead th {
  font-family: var(--fd);
  font-size: 13px;
  font-weight: 700;
  background: var(--sidebar-bg);
  color: var(--ink);
}
.product-compare tbody th {
  font-weight: 600;
  color: var(--ink);
  background: var(--panel);
  min-width: 11rem;
}
.product-compare tbody th code {
  font-size: 0.92em;
}
.product-compare td {
  text-align: center;
  width: 8.5rem;
  color: var(--mid);
}
.product-compare .compare-yes {
  color: var(--link);
  font-weight: 700;
  font-size: 16px;
}
.product-compare .compare-no {
  color: var(--faint);
}
.compare-note {
  font-size: 14px;
  color: var(--mid);
  margin-top: -0.5em;
  margin-bottom: 1.5em;
}

.legal-note {
  font-size: 13px;
  color: var(--mid);
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid var(--wire);
  line-height: 1.55;
}
