/* LockStack — guide pages (base.css + home.css must load first) */

/* ── Doc layout ── */
.doc-wrap {
  display: flex;
  min-height: calc(100vh - 64px);
}

.doc-nav {
  position: fixed;
  top: 64px; left: 0;
  width: 240px;
  height: calc(100vh - 64px);
  background: var(--surface-alt);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px 0;
  z-index: 10;
}

.doc-main {
  margin-left: 240px;
  flex: 1;
  padding: 56px 56px 96px;
  max-width: 780px;
}

/* ── Sidebar brand block ── */
.doc-nav-brand {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.doc-nav-product {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.doc-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 8px;
}
.doc-nav-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.doc-nav-badge.local  { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }
.doc-nav-badge.global { background:#f0f9ff; color:#0c4a6e; border:1px solid #bae6fd; }

/* ── Sidebar nav items ── */
.doc-nav-section { padding: 0 8px 8px; }
.doc-nav-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px 6px;
}
.doc-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: background .12s, color .12s;
  line-height: 1.3;
}
.doc-nav-item:hover { background: var(--border); color: var(--text-strong); }
.doc-nav-num {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 18px;
  font-variant-numeric: tabular-nums;
}

/* ── Hero ── */
.doc-hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.doc-hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.doc-hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  margin: 0 0 14px;
  line-height: 1.1;
}
.doc-hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.doc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  background: var(--surface-alt);
  color: var(--text-muted);
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* ── Sections ── */
.doc-section { margin-bottom: 72px; scroll-margin-top: 80px; }
.doc-section-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.doc-section h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  margin: 0 0 16px;
  line-height: 1.2;
}
.doc-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  margin: 28px 0 12px;
}
.doc-section p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 14px;
}
code {
  font-family: "SF Mono","Fira Code","Fira Mono",monospace;
  font-size: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--text-strong);
}

/* ── Callouts ── */
.doc-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid;
  margin: 20px 0;
}
.doc-callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.doc-callout-body { flex: 1; }
.doc-callout-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.doc-callout-text { font-size: 13.5px; line-height: 1.6; margin: 0; }

.doc-callout.success { background:#f0fdf4; border-color:#bbf7d0; }
.doc-callout.success .doc-callout-title { color:#15803d; }
.doc-callout.success .doc-callout-text { color:#14532d; }

.doc-callout.info { background:#f0f9ff; border-color:#bae6fd; }
.doc-callout.info .doc-callout-title { color:#0369a1; }
.doc-callout.info .doc-callout-text { color:#0c4a6e; }

.doc-callout.warn { background:#fffbeb; border-color:#fde68a; }
.doc-callout.warn .doc-callout-title { color:#b45309; }
.doc-callout.warn .doc-callout-text { color:#78350f; }

/* ── Requirements grid ── */
.doc-req-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:20px 0; }
.doc-req-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.doc-req-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.doc-req-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--text);
  padding: 4px 0;
  line-height: 1.4;
}
.doc-req-item::before {
  content: '';
  display: block;
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='8' fill='%2337352f'/><path d='M4.5 8.2l2.2 2.2 4.8-4.8' stroke='%23fff' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}
.doc-req-card.not .doc-req-item::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='7.5' fill='none' stroke='%23d3d1cb' stroke-width='1.5'/><path d='M5 5l6 6M11 5l-6 6' stroke='%23d3d1cb' stroke-width='1.5' stroke-linecap='round'/></svg>");
}

/* ── Steps ── */
.doc-steps { margin: 20px 0; }
.doc-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.doc-step:last-child { border-bottom: none; }
.doc-step-num {
  width: 28px; height: 28px;
  flex-shrink: 0;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 2px;
}
.doc-step-text { font-size: 14px; color: var(--text); line-height: 1.6; padding-top: 4px; }

/* ── Field table ── */
.doc-field-table { margin: 20px 0; }
.doc-field {
  display: grid;
  grid-template-columns: 160px 1fr;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
  background: var(--surface);
  transition: border-color .12s;
}
.doc-field:hover { border-color: var(--border-strong); }
.doc-field-label {
  padding: 14px 16px;
  background: var(--surface-alt);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.doc-field-name { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.doc-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.doc-badge.req   { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }
.doc-badge.opt   { background:var(--surface-alt); color:var(--text-muted); border:1px solid var(--border); }
.doc-badge.dflt  { background:var(--surface-alt); color:var(--text-muted); border:1px solid var(--border); }
.doc-field-body  { padding: 14px 16px; }
.doc-field-desc  { font-size: 13px; color: var(--text); line-height: 1.55; margin-bottom: 5px; }
.doc-field-example { font-size: 11px; color: var(--text-muted); font-family:"SF Mono","Fira Code",monospace; }
.doc-field-example strong { color: var(--text); font-weight: 600; }

/* ── Section subheader inside field table ── */
.doc-field-section-header {
  margin: 18px 0 8px;
  padding: 10px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.doc-field-section-header-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.doc-field-section-header-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Format table ── */
.doc-format-table { margin: 20px 0; }
.doc-format-row {
  display: grid;
  grid-template-columns: 175px 150px 1fr;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
  background: var(--surface);
  align-items: stretch;
}
.doc-format-ext {
  display: flex; align-items: center; justify-content: flex-start;
  background: var(--surface-alt);
  border-right: 1px solid var(--border);
  font-size: 11px; font-weight: 700;
  color: var(--text);
  font-family: "SF Mono","Fira Code",monospace;
  padding: 12px 14px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-format-name {
  display: flex; align-items: center;
  padding: 12px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--text-strong);
  border-right: 1px solid var(--border);
}
.doc-format-use {
  display: flex; align-items: center;
  padding: 12px 16px;
  font-size: 13px; color: var(--text); line-height: 1.4;
}

/* ── FAQ (details/summary) ── */
.doc-faq-list { border-top: 1px solid var(--border); }
.doc-faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.doc-faq-item summary {
  cursor: pointer;
  font-size: 15px; font-weight: 500;
  color: var(--text-strong);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.doc-faq-item summary::-webkit-details-marker { display: none; }
.doc-faq-item summary::after { content:"+"; color:var(--text-muted); font-size:20px; font-weight:400; flex-shrink:0; margin-left:16px; }
.doc-faq-item[open] summary::after { content:"−"; }
.doc-faq-item p { margin:12px 0 0; font-size:14px; color:var(--text-muted); line-height:1.6; }

/* ── Guide hub cards ── */
.guide-hub { max-width:900px; margin:0 auto; padding:72px 24px 120px; }
.guide-hub-hero { text-align:center; margin-bottom:56px; }
.guide-hub-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text-strong);
  margin: 0 0 16px;
  line-height: 1.0;
}
.guide-hub-hero p { font-size:17px; color:var(--text-muted); max-width:460px; margin:0 auto; line-height:1.6; }
.guide-cards { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.guide-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  background: var(--surface);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.guide-card:hover { border-color: var(--border-strong); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.guide-card-eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 12px;
}
.guide-card h2 { font-size:22px; font-weight:600; letter-spacing:-0.02em; color:var(--text-strong); margin:0 0 10px; }
.guide-card p { font-size:14px; color:var(--text-muted); line-height:1.55; margin:0 0 28px; flex:1; }

/* "View guide →" — pill-shaped click target.
   At rest: transparent. Hover: soft sky-blue tint. Active: glossy gradient
   with inset highlight (top-light → bottom-deep) and slight press-down. */
.guide-card-link {
  font-size: 14px;
  font-weight: 600;
  color: #0369a1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  width: fit-content;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  transition:
    background .2s ease,
    color .2s ease,
    gap .2s ease,
    box-shadow .2s ease,
    transform .12s ease;
}
.guide-card:hover .guide-card-link {
  color: #075985;
  gap: 12px;
  background: rgba(3, 105, 161, 0.06);
  box-shadow: inset 0 0 0 1px rgba(3, 105, 161, 0.14);
}
.guide-card:active .guide-card-link,
.guide-card-link:active {
  background: linear-gradient(
    180deg,
    rgba(186, 230, 253, 0.7) 0%,
    rgba(125, 211, 252, 0.4) 55%,
    rgba(3, 105, 161, 0.22) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(3, 105, 161, 0.25),
    0 0 0 1px rgba(3, 105, 161, 0.18);
  color: #054674;
  transform: scale(0.97);
}
.guide-card-feat {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.guide-card-feat-label { font-size:11px; font-weight:600; color:var(--text-muted); letter-spacing:0.06em; text-transform:uppercase; margin-bottom:10px; }
.guide-card-feat ul { list-style:none; padding:0; margin:0; }
.guide-card-feat li { font-size:13px; color:var(--text); padding:4px 0 4px 22px; position:relative; line-height:1.4; }
.guide-card-feat li::before {
  content:'';
  position:absolute; left:0; top:6px;
  width:14px; height:14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='8' fill='%2337352f'/><path d='M4.5 8.2l2.2 2.2 4.8-4.8' stroke='%23fff' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size:contain; background-repeat:no-repeat;
}

/* ── Responsive ── */
@media (max-width:900px) {
  .doc-nav { display:none; }
  .doc-main { margin-left:0; padding:32px 24px 72px; }
  .doc-req-grid { grid-template-columns:1fr; }
  .doc-format-row { grid-template-columns:48px 1fr; }
  .doc-format-use { display:none; }
  .doc-field { grid-template-columns:1fr; }
  .doc-field-label { border-right:none; border-bottom:1px solid var(--border); }
  .guide-cards { grid-template-columns:1fr; }
}
