/* iPlanr Docs — lightweight static styles. No frameworks. */
:root {
  --brand: #8c52ff;
  --brand-dark: #6d3fd4;
  --brand-ink: #4a2b9e;
  --text: #1c1c2b;
  --muted: #5f5f76;
  --faint: #8a8aa0;
  --bg: #ffffff;
  --bg-soft: #f7f5ff;
  --bg-wash: #faf9fe;
  --border: #e9e5f6;
  --radius: 10px;
  --maxw: 74ch;
  --shadow: 0 1px 2px rgba(76, 41, 158, 0.06), 0 4px 14px rgba(76, 41, 158, 0.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- top bar ---------- */
.docs-top {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.7rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px); z-index: 50;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-docs {
  font-weight: 700; font-size: 1.02rem; color: var(--brand-ink);
  border-left: 1px solid var(--border); padding-left: 0.55rem;
}
.search-wrap { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
#search {
  width: 100%; padding: 0.5rem 0.9rem 0.5rem 2.2rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a8aa0' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 0.8rem center;
  font-size: 0.92rem; color: var(--text); outline: none;
}
#search:focus { border-color: var(--brand); background-color: #fff; box-shadow: 0 0 0 3px rgba(140,82,255,0.12); }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; z-index: 60;
}
.sr-item { display: block; padding: 0.65rem 0.9rem; text-decoration: none; border-bottom: 1px solid var(--border); }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--bg-soft); }
.sr-title { display: block; font-weight: 600; color: var(--brand-ink); font-size: 0.95rem; }
.sr-snip { display: block; color: var(--muted); font-size: 0.83rem; }
.sr-empty { padding: 0.7rem 0.9rem; color: var(--muted); font-size: 0.9rem; }
.docs-top nav { display: flex; align-items: center; }
.docs-top nav a { margin-left: 1.1rem; color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.docs-top nav a:hover { color: var(--brand-dark); }
.btn-signin {
  border: 1px solid var(--brand) !important; color: var(--brand-dark) !important;
  padding: 0.35rem 0.95rem !important; border-radius: 999px !important; font-weight: 600 !important;
}
.btn-signin:hover { background: var(--brand); color: #fff !important; }

/* ---------- layout ---------- */
.docs-layout { display: flex; max-width: 1280px; margin: 0 auto; align-items: flex-start; }
.docs-sidebar {
  width: 264px; flex-shrink: 0;
  padding: 1.4rem 1rem 2rem;
  border-right: 1px solid var(--border);
  position: sticky; top: 57px;
  max-height: calc(100vh - 57px); overflow-y: auto;
}
.docs-sidebar h3 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); margin: 1.3rem 0 0.35rem; font-weight: 700; }
.docs-sidebar h3:first-child { margin-top: 0; }
.docs-sidebar ul { list-style: none; margin: 0; padding: 0; }
.docs-sidebar li a { display: block; padding: 0.34rem 0.65rem; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 0.93rem; }
.docs-sidebar li a:hover { background: var(--bg-soft); }
.docs-sidebar li a.active { background: var(--bg-soft); color: var(--brand-dark); font-weight: 650; }
.docs-main { flex: 1; min-width: 0; padding: 1.6rem 2.6rem 3rem; max-width: var(--maxw); }
.docs-toc {
  width: 220px; flex-shrink: 0; padding: 1.8rem 1.2rem;
  position: sticky; top: 57px; max-height: calc(100vh - 57px); overflow-y: auto;
  font-size: 0.86rem;
}
.docs-toc h4 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); margin: 0 0 0.5rem; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.docs-toc li a { display: block; padding: 0.22rem 0 0.22rem 0.9rem; color: var(--muted); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.docs-toc li a:hover { color: var(--brand-dark); border-left-color: var(--brand); }

/* ---------- content ---------- */
.crumbs { font-size: 0.84rem; color: var(--faint); margin-bottom: 0.4rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-dark); }
.crumbs span { margin: 0 0.3rem; }
.docs-main h1 { font-size: 2.1rem; line-height: 1.25; margin: 0 0 0.6rem; letter-spacing: -0.01em; }
.docs-main h1 + p { font-size: 1.08rem; color: var(--muted); }
.docs-main h2 { margin-top: 2.4rem; padding-top: 1.1rem; border-top: 1px solid var(--border); font-size: 1.42rem; letter-spacing: -0.01em; scroll-margin-top: 70px; }
.docs-main h3 { font-size: 1.12rem; margin-top: 1.6rem; }
.docs-main p, .docs-main li { color: #2c2c40; }
.docs-main a { color: var(--brand-dark); }
.docs-main ul, .docs-main ol { padding-left: 1.4rem; }
.docs-main li { margin: 0.35rem 0; }
.docs-main code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.87em; background: var(--bg-soft); border: 1px solid var(--border);
  padding: 0.1em 0.4em; border-radius: 5px; color: var(--brand-ink);
}
.callout { border-left: 4px solid var(--brand); background: var(--bg-soft); padding: 0.95rem 1.15rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.3rem 0; }
.callout p { margin: 0.3rem 0; }
.callout.tip { border-color: #1f9d63; }
.callout.warn { border-color: #d97706; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; margin: 1rem 0; padding-left: 2.8rem; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.1rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: linear-gradient(135deg, #9d6bff, var(--brand-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.steps li strong { color: var(--text); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.2rem; text-decoration: none; color: var(--text); background: #fff; transition: box-shadow 0.15s, border-color 0.15s; }
.card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 0.35rem; font-size: 1.04rem; color: var(--brand-ink); }
.card p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.shot { margin: 1.6rem 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 0.6rem 1rem; font-size: 0.86rem; color: var(--muted); background: var(--bg-wash); border-top: 1px solid var(--border); }
.shot-missing {
  margin: 1.6rem 0; padding: 1.4rem; border: 1.5px dashed var(--border); border-radius: var(--radius);
  background: var(--bg-wash); color: var(--muted); font-size: 0.92rem; text-align: center;
}
.faq { margin: 1.2rem 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: none; }
.faq summary { padding: 0.85rem 1.1rem; cursor: pointer; font-weight: 600; font-size: 0.98rem; }
.faq summary:hover { background: var(--bg-soft); }
.faq details p { padding: 0 1.1rem 1rem; margin: 0; color: var(--muted); font-size: 0.95rem; }
table.spec { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.94rem; }
table.spec th, table.spec td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); }
table.spec th { background: var(--bg-soft); color: var(--brand-ink); font-weight: 650; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.pager a { color: var(--brand-dark); text-decoration: none; font-weight: 600; font-size: 0.95rem; }

/* ---------- footer ---------- */
.docs-footer { border-top: 1px solid var(--border); background: var(--bg-wash); margin-top: 2rem; }
.footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem 1rem;
  display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.footer-inner strong { color: var(--brand-ink); }
.footer-inner span { color: var(--muted); font-size: 0.92rem; }
.footer-inner div:last-child { display: flex; gap: 1.4rem; align-items: flex-start; }
.footer-inner a { color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.footer-inner a:hover { color: var(--brand-dark); }
.footer-note { text-align: center; padding: 0 1.5rem 1.4rem; color: var(--faint); font-size: 0.84rem; }
.footer-note a { color: var(--faint); }

@media (max-width: 1080px) { .docs-toc { display: none; } }
@media (max-width: 860px) {
  .docs-sidebar { display: none; }
  .docs-main { padding: 1.4rem 1.2rem 2.5rem; }
  .search-wrap { max-width: none; }
  .docs-top nav a:not(.btn-signin) { display: none; }
}

/* ---------- hero (index) ---------- */
.hero {
  background: linear-gradient(120deg, #f5f0ff 0%, #ece4ff 55%, #f9f6ff 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.4rem 2.2rem;
  margin-bottom: 0.6rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -70px;
  width: 230px; height: 230px; border-radius: 50%;
  background: radial-gradient(circle, rgba(140,82,255,0.22), rgba(140,82,255,0) 70%);
}
.hero h1 {
  font-size: 2.35rem; margin: 0 0 0.5rem; letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--brand-ink), var(--brand-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 58ch; margin: 0 0 1.4rem; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.btn-primary {
  display: inline-block; padding: 0.65rem 1.5rem; border-radius: 999px;
  background: linear-gradient(135deg, #9d6bff, var(--brand-dark)); color: #fff !important;
  font-weight: 650; text-decoration: none; box-shadow: 0 4px 14px rgba(140,82,255,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(140,82,255,0.45); }
.btn-ghost {
  display: inline-block; padding: 0.65rem 1.5rem; border-radius: 999px;
  border: 1.5px solid var(--brand); color: var(--brand-dark) !important;
  font-weight: 650; text-decoration: none; background: #fff;
}
.btn-ghost:hover { background: var(--bg-soft); }
.card { position: relative; overflow: hidden; }
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), #b48cff);
  opacity: 0; transition: opacity 0.15s;
}
.card:hover::before { opacity: 1; }
.card:hover { transform: translateY(-2px); }
