/* Simple Worship Presenter — documentation site styles.
   Plain static site: upload this folder to the docs subdomain as-is.
   Palette and type match the public website at simpleworshippresenter.com. */

:root {
  --ink: #20201d;
  --muted: #77766f;
  --line: #e9e7e1;
  --paper: #f8f8f5;
  --white: #fff;
  --orange: #e96e3d;
  --orange-dark: #cf5930;
  --orange-soft: #fbeee8;
  --code-bg: #f1efeb;
  --sidebar-w: 252px;
  --toc-w: 208px;
  --radius: 9px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dark); text-decoration: underline; }

img, svg { max-width: 100%; }

/* ---------- brand primitives (shared with the marketing site) ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.7px;
  text-decoration: none;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand > span:nth-child(2) { font-weight: 800; }
.brand > span:last-child {
  font-weight: 500;
  color: #8c8b84;
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--line);
}
.brand-mark { width: 26px; height: 26px; display: flex; align-items: flex-end; gap: 3px; flex: 0 0 auto; }
.brand-mark i {
  display: block;
  width: 6px;
  border-radius: 4px;
  background: var(--orange);
  transform: skew(-18deg);
}
.brand-mark i:nth-child(1) { height: 13px; }
.brand-mark i:nth-child(2) { height: 21px; }
.brand-mark i:nth-child(3) { height: 16px; }

.eyebrow {
  font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #92918a;
  margin: 0 0 10px;
}

kbd {
  background: #f4f2ee;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 7px;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  color: #555;
  white-space: nowrap;
}

code {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}

pre {
  background: #23262c;
  color: #e8e6e0;
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.7;
  margin: 18px 0;
}
pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.code-block { position: relative; }
.code-block .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2c3037;
  color: #a9a7a0;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 7px 14px;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.code-block .code-head + pre { margin-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.copy-button {
  background: transparent;
  border: 1px solid #4a4e56;
  color: #c8c6c0;
  border-radius: 5px;
  font: inherit;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 9px;
  cursor: pointer;
}
.copy-button:hover { border-color: var(--orange); color: var(--orange); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(248, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-link {
  color: #55544f;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 7px;
}
.header-link:hover { color: var(--orange-dark); text-decoration: none; background: var(--white); }
.header-link.primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 5px 15px #e96e3d30;
}
.header-link.primary:hover { background: var(--orange-dark); color: #fff; }

.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #92918a;
  font: inherit;
  font-size: 12.5px;
  padding: 7px 10px;
  cursor: pointer;
  text-align: left;
}
.search-trigger:hover { border-color: #d9b4a4; }
.search-trigger .label { flex: 1; }
.search-trigger svg { width: 14px; height: 14px; stroke: #92918a; fill: none; stroke-width: 2; }

.menu-button {
  display: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #55544f;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
}

/* ---------- layout ---------- */

.layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  gap: 46px;
  align-items: start;
}

/* ---------- sidebar ---------- */

.sidebar {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 30px 4px 40px 0;
}
.nav-section { margin-bottom: 26px; }
.nav-title {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #92918a;
  margin: 0 0 9px;
  padding-left: 11px;
}
.sidebar a {
  display: block;
  color: #55544f;
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 7px;
  border-left: 2px solid transparent;
}
.sidebar a:hover { color: var(--orange-dark); background: var(--white); text-decoration: none; }
.sidebar a.active {
  color: var(--orange-dark);
  background: var(--orange-soft);
  border-left-color: var(--orange);
  font-weight: 700;
}

/* ---------- article ---------- */

.article { padding: 34px 0 0; min-width: 0; }

.breadcrumbs {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #92918a;
  margin: 0 0 14px;
}
.breadcrumbs a { color: #92918a; }
.breadcrumbs a:hover { color: var(--orange-dark); }
.breadcrumbs span { margin: 0 7px; }

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.6px; }
h1 { font-size: 33px; font-weight: 800; margin: 0 0 14px; }
h2 {
  font-size: 21px;
  font-weight: 800;
  margin: 44px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 { font-size: 16px; font-weight: 700; margin: 28px 0 8px; }
h4 { font-size: 14px; font-weight: 700; margin: 22px 0 6px; }

.lead {
  font-size: 17px;
  line-height: 1.6;
  color: #55544f;
  margin: 0 0 26px;
  max-width: 62ch;
}

.article p, .article li { max-width: 72ch; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 5px 0; }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  background: #f4f2ee;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #77766f;
  font-weight: 500;
}
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* ---------- callouts ---------- */

.callout {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 20px 0;
}
.callout p { margin: 0 0 8px; }
.callout p:last-child { margin-bottom: 0; }
.callout .callout-label {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--orange-dark);
  margin: 0 0 6px;
}
.callout.tip { border-left-color: #4c8f6a; }
.callout.tip .callout-label { color: #3f7459; }
.callout.warning { border-left-color: #c9962f; }
.callout.warning .callout-label { color: #96701f; }
.callout.danger { border-left-color: #c0453c; }
.callout.danger .callout-label { color: #a23a32; }

/* ---------- cards ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 22px 0; }
.card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--ink);
}
.card:hover { border-color: #d9b4a4; text-decoration: none; box-shadow: 0 6px 18px rgba(32, 32, 29, 0.05); }
.card .card-title { font-weight: 700; font-size: 14.5px; margin: 0 0 5px; color: var(--ink); }
.card .card-title .arrow { color: var(--orange); }
.card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.card .eyebrow { margin-bottom: 8px; }

/* ---------- step blocks ---------- */

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  margin: 18px 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps > li > strong:first-child { display: block; margin-bottom: 3px; }

.checklist { list-style: none; padding-left: 0; }
.checklist li { padding-left: 28px; position: relative; margin: 9px 0; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 13px;
  height: 7px;
  border-left: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(-45deg);
}

/* ---------- inline bits ---------- */

.method {
  display: inline-block;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  margin-right: 7px;
}
.method.get { background: #e7f1ea; color: #3f7459; }
.method.delete { background: #f8e7e5; color: #a23a32; }
.method.put { background: #eef0f6; color: #4a5578; }

.pill {
  display: inline-block;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- page footer nav ---------- */

.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 52px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.page-nav a {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--ink);
}
.page-nav a:hover { border-color: #d9b4a4; text-decoration: none; }
.page-nav .dir {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #92918a;
  display: block;
  margin-bottom: 4px;
}
.page-nav .next { text-align: right; }
.page-nav .title { font-weight: 700; font-size: 14px; }
.page-nav .empty { border: 0; background: none; }

/* ---------- on-this-page ---------- */

.toc {
  position: sticky;
  top: 74px;
  padding: 38px 0 40px;
  font-size: 12.5px;
}
.toc .toc-title {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #92918a;
  margin: 0 0 10px;
}
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a {
  display: block;
  color: var(--muted);
  padding: 4px 0 4px 13px;
  border-left: 2px solid transparent;
  margin-left: -1px;
  line-height: 1.45;
}
.toc a:hover { color: var(--orange-dark); text-decoration: none; }
.toc a.active { color: var(--orange-dark); border-left-color: var(--orange); font-weight: 600; }
.toc a.sub { padding-left: 26px; font-size: 12px; }

/* ---------- site footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--white);
}
.site-footer .inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 24px 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  color: var(--muted);
  font-size: 12.5px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--orange-dark); }

/* ---------- search overlay ---------- */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(32, 32, 29, 0.42);
  display: none;
  padding: 10vh 18px 18px;
}
.search-overlay.open { display: block; }
.search-panel {
  max-width: 620px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(32, 32, 29, 0.28);
  overflow: hidden;
}
.search-panel input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 17px 20px;
  font: inherit;
  font-size: 16px;
  outline: none;
  background: transparent;
}
.search-results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.search-results a {
  display: block;
  padding: 11px 13px;
  border-radius: 8px;
  color: var(--ink);
}
.search-results a:hover, .search-results a.selected { background: var(--orange-soft); text-decoration: none; }
.search-results .r-title { font-weight: 700; font-size: 14px; }
.search-results .r-section {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #92918a;
  margin-left: 8px;
}
.search-results .r-text { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.search-empty { padding: 22px; color: var(--muted); font-size: 13.5px; text-align: center; }
.search-foot {
  border-top: 1px solid var(--line);
  padding: 9px 16px;
  color: #92918a;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 1px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- home page hero ---------- */

.hero {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 38px 34px;
  margin: 8px 0 30px;
}
.hero h1 { font-size: 34px; margin-bottom: 12px; }
.hero .lead { margin-bottom: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.primary-button,
.secondary-button {
  display: inline-block;
  border: 0;
  border-radius: 7px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.primary-button { background: var(--orange); color: #fff; box-shadow: 0 5px 15px #e96e3d30; }
.primary-button:hover { background: var(--orange-dark); color: #fff; text-decoration: none; }
.secondary-button { background: var(--white); border: 1px solid var(--line); color: #55544f; }
.secondary-button:hover { border-color: #d9b4a4; color: var(--orange-dark); text-decoration: none; }

.stat-row { display: flex; flex-wrap: wrap; gap: 26px; margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.stat .num { font-size: 22px; font-weight: 800; letter-spacing: -0.7px; }
.stat .cap { font-size: 12px; color: var(--muted); }

/* ---------- responsive ---------- */

@media (max-width: 1140px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 880px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-button { display: inline-block; }
  .search-trigger { min-width: 0; }
  .search-trigger .label, .search-trigger kbd { display: none; }
  .header-link.hide-mobile { display: none; }
  .sidebar {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 20px 18px 60px;
    max-height: none;
    display: none;
    z-index: 55;
  }
  .sidebar.open { display: block; }
  .article { padding-top: 22px; }
  h1 { font-size: 27px; }
  .hero { padding: 26px 20px; }
  .hero h1 { font-size: 26px; }
  .page-nav { grid-template-columns: 1fr; }
  .brand > span:last-child { display: none; }
}
