/* Remvx — Documentation (calm, organized reference layout) */

body[data-page="docs"] {
  background: #080808;
}

/* ── Header ── */
.docs-header {
  padding: 6.5rem 0 2.5rem;
  border-bottom: 1px solid #1a1a1a;
  background: #080808;
}

.docs-header__eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #71717a;
  margin: 0 0 0.75rem;
}

.docs-header__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fafafa;
  margin: 0;
}

.docs-header__lead {
  margin: 1rem 0 0;
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.7;
  color: #a1a1aa;
}

.docs-header__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #1a1a1a;
}

.docs-header__fact dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #52525b;
  margin: 0 0 0.2rem;
}

.docs-header__fact dd {
  margin: 0;
  font-size: 0.875rem;
  color: #d4d4d8;
}

/* ── Layout ── */
.docs-layout {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

@media (min-width: 1024px) {
  .docs-layout {
    grid-template-columns: 13.5rem minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }
}

/* ── Sidebar ── */
.docs-nav {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.docs-nav__group {
  margin-bottom: 1.5rem;
}

.docs-nav__group:last-child {
  margin-bottom: 0;
}

.docs-nav__heading {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #52525b;
  margin: 0 0 0.4rem;
  padding: 0;
}

.docs-nav a {
  display: block;
  padding: 0.4rem 0 0.4rem 0.75rem;
  margin-left: -0.75rem;
  border-left: 2px solid transparent;
  border-radius: 0;
  font-size: 0.8125rem;
  font-weight: 450;
  color: #71717a;
  transition: color 0.15s, border-color 0.15s;
}

.docs-nav a:hover {
  color: #e4e4e7;
  background: transparent;
}

.docs-nav a.is-active {
  color: #fafafa;
  border-left-color: #ef4444;
  background: transparent;
}

/* ── Main content ── */
.docs-content {
  max-width: 42rem;
}

.docs-section {
  scroll-margin-top: 6rem;
  padding-bottom: 2.75rem;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid #1a1a1a;
}

.docs-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.docs-section__label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #52525b;
  margin: 0 0 0.35rem;
}

.docs-section h2 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fafafa;
  margin: 0 0 0.85rem;
}

.docs-section p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #a1a1aa;
  margin: 0 0 1rem;
}

.docs-section p:last-child {
  margin-bottom: 0;
}

.docs-section a {
  color: #e4e4e7;
  text-decoration: underline;
  text-decoration-color: #3f3f46;
  text-underline-offset: 2px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.docs-section a:hover {
  color: #fafafa;
  text-decoration-color: #ef4444;
}

/* Ordered steps — simple list */
.docs-steps {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: docs-step;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.docs-steps li {
  counter-increment: docs-step;
  display: flex;
  gap: 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #a1a1aa;
}

.docs-steps li::before {
  content: counter(docs-step) ".";
  flex-shrink: 0;
  width: 1.25rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #52525b;
  text-align: right;
}

/* Code block */
.docs-code {
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
  border-radius: 0.5rem;
  background: #0c0c0c;
  border: 1px solid #1f1f1f;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #d4d4d8;
  overflow-x: auto;
}

.docs-code__caption {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #52525b;
}

/* Availability tag — inline, muted */
.docs-tag {
  display: inline-block;
  margin-left: 0.5rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #52525b;
  vertical-align: middle;
}

/* Footer note */
.docs-footer-note {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #1a1a1a;
}

.docs-footer-note h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fafafa;
  margin: 0 0 0.5rem;
}

.docs-footer-note p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #71717a;
  margin: 0 0 1rem;
}

.docs-footer-note__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.docs-footer-note__links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #d4d4d8;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #262626;
  background: #0c0c0c;
  transition: border-color 0.15s, color 0.15s;
}

.docs-footer-note__links a:hover {
  border-color: #3f3f46;
  color: #fafafa;
}

.docs-footer-note__links a.docs-footer-note__primary {
  background: #fafafa;
  color: #0a0a0a;
  border-color: #fafafa;
}

.docs-footer-note__links a.docs-footer-note__primary:hover {
  background: #e4e4e7;
  border-color: #e4e4e7;
}

/* Breadcrumb */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  color: #52525b;
}

.docs-breadcrumb a {
  color: #71717a;
  text-decoration: none;
  transition: color 0.15s;
}

.docs-breadcrumb a:hover {
  color: #fafafa;
}

/* Security controls grid */
.docs-controls {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .docs-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.docs-control {
  padding: 0.85rem 0.95rem;
  border-radius: 0.5rem;
  border: 1px solid #1f1f1f;
  background: #0c0c0c;
}

.docs-control h3 {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fafafa;
}

.docs-control p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #71717a;
}

.docs-control a {
  color: #d4d4d8;
}

/* Architecture diagram */
.docs-arch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.35rem;
  margin: 1.25rem 0 0;
  padding: 1.25rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #1f1f1f;
  background: #0a0a0a;
}

.docs-arch__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.65rem 0.75rem;
  min-width: 6.5rem;
  border-radius: 0.5rem;
  border: 1px solid #262626;
  background: #050505;
}

.docs-arch__node--core {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.04);
}

.docs-arch__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  font-weight: 600;
  color: #a1a1aa;
  background: #111;
  border: 1px solid #222;
  margin-bottom: 0.4rem;
}

.docs-arch__node strong {
  font-size: 0.6875rem;
  color: #e4e4e7;
}

.docs-arch__node span {
  margin-top: 0.15rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5rem;
  color: #52525b;
}

.docs-arch__link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3f3f46;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  border: 1px solid #1f1f1f;
  background: #080808;
}

/* Contact block */
.docs-contact {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #1f1f1f;
  background: #0c0c0c;
}

@media (min-width: 480px) {
  .docs-contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.docs-contact__label {
  margin: 0 0 0.25rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #52525b;
}

.docs-contact__value {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #a1a1aa;
}

.docs-contact__value a {
  color: #d4d4d8;
  text-decoration: underline;
  text-decoration-color: #3f3f46;
}

/* Product components list */
.docs-components {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.docs-component {
  padding: 0.9rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #1f1f1f;
  background: #0c0c0c;
}

.docs-component__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.docs-component h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fafafa;
}

.docs-component h3 a {
  color: inherit;
  text-decoration: none;
}

.docs-component h3 a:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #3f3f46;
}

.docs-component__ver {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #52525b;
  flex-shrink: 0;
}

.docs-component__sub {
  margin: 0.15rem 0 0.4rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  color: #71717a;
}

.docs-component p:last-child {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #71717a;
}

/* Callouts */
.docs-callout {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-radius: 0.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.docs-callout__icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  color: #71717a;
}

.docs-callout__body p {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #a1a1aa;
}

.docs-callout__body p:last-child {
  margin-bottom: 0;
}

.docs-callout__body strong {
  color: #d4d4d8;
}

.docs-callout--info {
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.05);
}

.docs-callout--info .docs-callout__icon {
  color: #60a5fa;
}

.docs-callout--warn {
  border: 1px solid rgba(234, 179, 8, 0.25);
  background: rgba(234, 179, 8, 0.05);
}

.docs-callout--warn .docs-callout__icon {
  color: #facc15;
}

.docs-callout--neutral {
  border: 1px solid #262626;
  background: #0c0c0c;
}

/* Code block with copy */
.docs-code-block {
  margin: 1.25rem 0;
  border-radius: 0.5rem;
  border: 1px solid #1f1f1f;
  background: #0c0c0c;
  overflow: hidden;
}

.docs-code-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid #1a1a1a;
  background: #080808;
}

.docs-code-block__lang {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #52525b;
}

.docs-copy-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #71717a;
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  border: 1px solid #333;
  background: #111;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.docs-copy-btn:hover {
  color: #fafafa;
  border-color: #444;
}

.docs-copy-btn.is-copied {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
}

.docs-code-block .docs-code {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

/* Purpose / use-case grid */
.docs-purpose-grid {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .docs-purpose-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.docs-purpose-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid #1f1f1f;
  background: #0c0c0c;
}

.docs-purpose-item svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  color: #71717a;
}

.docs-purpose-item span {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #a1a1aa;
}

/* Numbered procedure steps */
.docs-procedure {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: docstep;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.docs-procedure > li {
  counter-increment: docstep;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.docs-procedure > li::before {
  content: counter(docstep);
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #a1a1aa;
  background: #111;
  border: 1px solid #262626;
}

.docs-procedure__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e4e4e7;
  margin-bottom: 0.25rem;
}

.docs-procedure p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #71717a;
}

/* FAQ accordion */
.docs-faq {
  margin: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.docs-faq details {
  border-radius: 0.5rem;
  border: 1px solid #1f1f1f;
  background: #0c0c0c;
  overflow: hidden;
}

.docs-faq summary {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #e4e4e7;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.docs-faq summary::-webkit-details-marker {
  display: none;
}

.docs-faq summary::after {
  content: "+";
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.875rem;
  color: #52525b;
  flex-shrink: 0;
}

.docs-faq details[open] summary::after {
  content: "−";
}

.docs-faq details[open] summary {
  border-bottom: 1px solid #1a1a1a;
}

.docs-faq__answer {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #71717a;
}

.docs-faq__answer p {
  margin: 0 0 0.65rem;
}

.docs-faq__answer p:last-child {
  margin-bottom: 0;
}

/* Section icon heading */
.docs-icon-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.docs-icon-heading svg {
  width: 1.125rem;
  height: 1.125rem;
  color: #71717a;
  flex-shrink: 0;
}

.docs-icon-heading h2,
.docs-icon-heading h3 {
  margin: 0;
}

.docs-section h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fafafa;
  margin: 1.5rem 0 0.65rem;
}

/* Signature status table */
.docs-status-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.8125rem;
}

.docs-status-table th,
.docs-status-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #1a1a1a;
  vertical-align: top;
}

.docs-status-table th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #52525b;
  background: #0a0a0a;
}

.docs-status-table td {
  color: #a1a1aa;
}

.docs-status-table td:first-child {
  font-weight: 500;
  color: #d4d4d8;
  white-space: nowrap;
}

.docs-status--ok { color: #4ade80 !important; }
.docs-status--bad { color: #f87171 !important; }
.docs-status--unk { color: #fb923c !important; }

/* Mobile nav — horizontal scroll */
@media (max-width: 1023px) {
  .docs-nav {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .docs-nav::-webkit-scrollbar {
    display: none;
  }

  .docs-nav__group {
    display: contents;
  }

  .docs-nav__heading {
    display: none;
  }

  .docs-nav a {
    flex-shrink: 0;
    white-space: nowrap;
    margin: 0;
    padding: 0.4rem 0.75rem;
    border: 1px solid #1f1f1f;
    border-radius: 999px;
    border-left: 1px solid #1f1f1f;
    font-size: 0.75rem;
    background: #0c0c0c;
  }

  .docs-nav a.is-active {
    border-color: #3f3f46;
    color: #fafafa;
  }
}
