@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400..700&family=Geist+Mono:wght@500;600&display=swap");

/* CrewCommerce documentation styles — the site's design system (Geist, navy, slate, one purple accent) */

:root {
  --paper: #f7f5f0;
  --ink: #1c2321;
  --ink-soft: #5b5d53;
  --ink-faint: #8a8c80;
  --line: #ddd8c8;
  --bg: #ffffff;
  --bg-soft: #f7f5f0;
  --accent: #453873;
  --accent-strong: #2d2350;
  --accent-soft: #e9e4f3;
  --good: #2f7a4f;
  --good-bg: #e6f2ea;
  --warn: #8a5f27;
  --warn-bg: #f5ecd9;
  --bad: #a33a26;
  --bad-bg: #f7e6e1;
  --shadow: rgba(28, 35, 33, 0.08);
  --radius: 10px;
  --maxw: 780px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }

.layout {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 24px 20px 60px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  overflow-y: auto;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--accent-strong);
  margin-bottom: 4px;
}

.sidebar .brand:hover { text-decoration: none; }

.sidebar .brand svg { flex: none; display: block; }

.sidebar .brand-sub {
  display: block;
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.sidebar .site-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}

.sidebar .site-link:hover { color: var(--accent-strong); }

/* ---------- Search ---------- */

.search-box {
  position: relative;
  margin-bottom: 20px;
}

.search-box input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px 8px 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b5d53' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 8px center;
  background-size: 14px;
  color: var(--ink);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-box .search-hint {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 11px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  pointer-events: none;
}

.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px var(--shadow);
  z-index: 30;
}

.search-results.open { display: block; }

.search-results a {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover, .search-results a.sel { background: var(--accent-soft); text-decoration: none; }

.search-results .r-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.search-results .r-title mark,
.search-results .r-snippet mark {
  background: none;
  color: var(--accent);
  font-weight: 700;
}
.search-results .r-snippet {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.search-results .r-empty {
  padding: 14px 12px;
  font-size: 13px;
  color: var(--ink-faint);
}

.sidebar nav h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin: 20px 0 8px;
}

.sidebar nav h3:first-of-type { margin-top: 0; }

.sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar nav li a {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
}

.sidebar nav li a:hover { background: var(--accent-soft); text-decoration: none; }

.sidebar nav li a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

#nav-toggle { display: none; }
.nav-toggle-label { display: none; }

/* ---------- Main content ---------- */

.content {
  flex: 1;
  min-width: 0;
  padding: 40px 32px 100px;
  display: flex;
  justify-content: center;
}

.content > article {
  width: 100%;
  max-width: var(--maxw);
}

.content h1 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 8px;
}

.content .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0 0 12px;
}

.content .lede {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.content h2 {
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin: 40px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.content h2:first-of-type { border-top: none; padding-top: 0; }

.content h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.content p, .content li { font-size: 16px; color: var(--ink); }
.content p { color: var(--ink-soft); }

.content ul, .content ol { padding-left: 22px; }

.content code {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.9em;
  color: var(--ink);
}

.content pre {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.5;
}

.content pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 14px;
}

/* ---------- Screenshots ---------- */

figure.shot {
  margin: 20px 0 28px;
}

figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px var(--shadow);
}

figure.shot figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-faint);
}

/* Click-to-enlarge: shot-frame wraps each figure.shot img at runtime
   (see the shared page script) so the hover badge sits over just the
   image, not the caption below it. */
.shot-frame {
  position: relative;
  display: block;
  cursor: zoom-in;
}

.shot-frame img { margin: 0; }

.shot-enlarge-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: rgba(28, 35, 33, 0.72);
  padding: 5px 10px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.shot-frame:hover .shot-enlarge-badge,
.shot-frame:focus-visible .shot-enlarge-badge {
  opacity: 1;
}

.shot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 24, 22, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  cursor: zoom-out;
}

.shot-lightbox[hidden] { display: none; }

.shot-lightbox-img {
  max-width: min(92vw, 1300px);
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.shot-lightbox-caption {
  max-width: 700px;
  margin-top: 16px;
  text-align: center;
  font-size: 13.5px;
  color: #e7e4ee;
  cursor: default;
}

.shot-lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.shot-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- Callouts ---------- */

.callout {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 15px;
  color: var(--ink);
}

.callout strong.label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.callout.tip { background: var(--accent-soft); }
.callout.tip strong.label { color: var(--accent-strong); }

.callout.good { background: var(--good-bg); }
.callout.good strong.label { color: var(--good); }

.callout.warn { background: var(--warn-bg); }
.callout.warn strong.label { color: var(--warn); }

.callout.bad { background: var(--bad-bg); }
.callout.bad strong.label { color: var(--bad); }

/* ---------- Step list ---------- */

ol.steps { list-style: none; padding: 0; counter-reset: step; }
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 24px 44px;
  margin-bottom: 4px;
  border-left: 2px solid var(--line);
  margin-left: 15px;
}
ol.steps > li:last-child { border-left: 2px solid transparent; padding-bottom: 0; }
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -15px;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
ol.steps h3 { margin-top: 0; }

/* ---------- Cards / grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0 32px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg);
}

.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* ---------- Next-step footer ---------- */

.next-steps {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.next-steps h2 { border-top: none; padding-top: 0; margin-top: 0; }

.next-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.next-links a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 600;
  background: var(--bg);
}
.next-links a:hover { border-color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.next-links a span {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 3px;
}

/* ---------- Tables ---------- */

table.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 28px;
  font-size: 14.5px;
}
table.doc-table th, table.doc-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
table.doc-table th {
  color: var(--ink-soft);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
  background: #f0eee6;
}

/* ---------- Buttons in copy ---------- */

kbd.ui {
  font-family: inherit;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 0.92em;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    width: 78vw;
    max-width: 300px;
    overflow-y: auto;
  }
  #nav-toggle:checked ~ .layout .sidebar { transform: translateX(0); }
  .nav-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    font-weight: 700;
    color: var(--ink);
  }
  .content { padding: 20px 18px 80px; }
}


/* =========================================================================
   Design system — matches the landing page: charcoal header colour for the
   sidebar, warm paper reading area, Geist at weight 550 for headings, one
   muted purple accent with lavender tints
   ========================================================================= */
:root {
  --dark: #191824;
  --paper: #191824;           /* sidebar */
  --ink: #24252c;
  --ink-soft: #646570;
  --ink-faint: #77707f;
  --line: #e4e2e8;
  --bg: #faf9f6;              /* reading area, as the landing page body */
  --bg-soft: #f5f3f8;
  --accent: #574398;
  --accent-strong: #423176;
  --accent-soft: #ece7f7;
  --on-dark: #c9b9f1;
  --good: #377457;
  --good-bg: #e8f2eb;
  --warn: #86601a;
  --warn-bg: #f9edce;
  --bad: #a33a3a;
  --bad-bg: #f7e7e7;
  --shadow: rgba(25, 24, 36, 0.08);
}
body { font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
a { text-underline-offset: 4px; }
:focus-visible { outline: 3px solid #ae90ee; outline-offset: 3px; }

.sidebar { background: var(--dark); border-right: 1px solid #2c2936; color: #c5c1ce; }
.sidebar .brand { color: #fff; font-weight: 550; letter-spacing: -0.03em; }
.sidebar .brand svg circle { stroke: var(--on-dark); }
.sidebar .brand svg g path { fill: var(--on-dark); }
.sidebar .brand-sub { color: #a69aac; }
.sidebar .site-link { color: var(--on-dark); }
.sidebar .site-link:hover { color: #fff; }
.search-box input { background: #24222f; border-color: #36333f; color: #fff; border-radius: 6px; }
.search-box input::placeholder { color: #8f879b; }
.search-box input:focus { border-color: var(--on-dark); box-shadow: 0 0 0 3px rgba(201, 185, 241, .2); }
.search-box .search-hint { background: #2b2836; border-color: #3d3948; color: #a69aac; }
.search-results { background: #fff; color: var(--ink); border-radius: 8px; }
.sidebar nav h3 { color: #8f879b; font-weight: 650; letter-spacing: .11em; }
.sidebar nav li a { color: #c5c1ce; border-radius: 6px; }
.sidebar nav li a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar nav li a.active { background: rgba(201, 185, 241, .14); color: #fff; box-shadow: inset 2px 0 0 var(--on-dark); font-weight: 600; }

.content h1 { font-size: clamp(32px, 3.6vw, 40px); font-weight: 550; letter-spacing: -0.04em; line-height: 1.08; margin-bottom: 12px; }
.content h2 { font-size: 24px; font-weight: 550; letter-spacing: -0.03em; }
.content h3 { font-weight: 550; letter-spacing: -0.025em; }
.content p, .content li { font-size: 15.5px; line-height: 1.75; }
.content .lede { font-size: 17px; line-height: 1.7; }
.content .eyebrow { display: flex; align-items: center; gap: 10px; background: none; padding: 0; border-radius: 0; color: var(--accent); font-weight: 650; letter-spacing: .11em; font-size: 12px; margin-bottom: 16px; }
.content .eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.content code { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-soft); color: var(--ink); border: 1px solid #e9e4ef; }
.content pre { background: var(--dark); color: #e6e1ee; border: 0; border-radius: 8px; }
.content pre code { background: none; border: 0; color: inherit; }

.callout { border-left: 3px solid; border-radius: 8px; }
.callout.tip { border-left-color: var(--accent); }
.callout.good { border-left-color: var(--good); }
.callout.warn { border-left-color: #c9a04a; }
.callout.bad { border-left-color: var(--bad); }
.callout strong.label { font-weight: 650; letter-spacing: .11em; }

ol.steps > li { border-left-color: #cfc4dc; }
ol.steps > li::before { background: #ded5e9; color: var(--accent); font-size: 12px; font-weight: 600; }
.card { background: #fff; border-color: var(--line); border-radius: 9px; box-shadow: none; }
.next-links a { background: #fff; border-color: var(--line); border-radius: 9px; font-weight: 550; }
.next-links a:hover { border-color: var(--accent); background: var(--accent-soft); }
table.doc-table th { background: var(--bg-soft); color: var(--ink-soft); font-weight: 650; letter-spacing: .08em; }
figure.shot img, .shot-frame { border-color: var(--line); }
/* Narrow screenshots (the My Account menu) shown near their real size rather than stretched */
figure.shot-compact .shot-frame, figure.shot-compact > img { max-width: 440px; }
kbd.ui { background: #fff; }
.shot-lightbox { background: rgba(16, 13, 22, .88); }

@media (max-width: 860px) {
  .nav-toggle-label { background: var(--dark); color: #fff; border-bottom: 1px solid #36333f; }
}

/* Keep the dark sidebar column full height on long pages */
@media (min-width: 861px) {
  .layout { background: linear-gradient(to right, var(--dark) 260px, var(--bg) 260px); }
}

/* Free and Pro */
.pro-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.68em;
  font-weight: 650;
  letter-spacing: .04em;
  vertical-align: 0.15em;
  line-height: 1.5;
}
table.plans td.yes { color: var(--good); font-weight: 650; text-align: center; }
table.plans td.no { color: var(--ink-soft); text-align: center; }
table.plans th:nth-child(2), table.plans th:nth-child(3) { text-align: center; width: 70px; }
