/* ============================================================
   Covenant — Help Center styles. Reuses the marketing brand tokens
   (Playfair / Inter / IBM Plex Mono, pine/verdigris/parchment/crimson)
   and adds a docs layout: sidebar nav + readable article column.
   Loaded alongside ../../assets/site.css (which defines the :root tokens,
   nav, footer, and .btn). No build step, no dependencies.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --pine: #0F3D3E; --verdigris: #1C5D5A; --parchment: #F4EFE6; --crimson: #A8323A;
  --ink: #14201F; --sage: #CFE0D8; --line: #d9cfbe;
  --serif: 'Playfair Display', Georgia, serif; --sans: 'Inter', system-ui, sans-serif; --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--parchment); line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--pine); line-height: 1.15; letter-spacing: -.015em; margin: 1.6em 0 .5em; }
h1 { font-size: 2.1rem; margin-top: .2em; }
h2 { font-size: 1.5rem; border-bottom: 2px solid var(--line); padding-bottom: .3em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; color: var(--verdigris); }
a { color: var(--verdigris); }
a:hover { color: var(--crimson); }
code { font-family: var(--mono); font-size: .9em; background: #fffdf8; border: 1px solid var(--line); border-radius: 5px; padding: .08em .35em; }
.mono { font-family: var(--mono); }

/* ---- top nav (mirrors the app/marketing nav) ---- */
.nav { background: var(--pine); position: sticky; top: 0; z-index: 20; }
.nav-inner { max-width: 1120px; margin: 0 auto; padding: .7rem 1.2rem; display: flex; align-items: center; gap: 1.1rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--serif); font-weight: 900; font-size: 1.3rem; color: var(--parchment); text-decoration: none; margin-right: auto; }
.brand .seal { width: 28px; height: 28px; }
.nav a:not(.brand), .nav span:not(.brand) { color: var(--sage); text-decoration: none; font-weight: 500; font-size: .92rem; }
.nav a:not(.brand):hover { color: #fff; }
.nav a.cta { background: var(--crimson); color: #fff; padding: .45rem .85rem; border-radius: 8px; }

/* ---- layout: sidebar + article ---- */
.doc-wrap { max-width: 1120px; margin: 0 auto; padding: 1.4rem 1.2rem 4rem; display: grid; grid-template-columns: 240px 1fr; gap: 2.4rem; }
.doc-side { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 90px); overflow: auto; font-size: .9rem; }
.doc-side h4 { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--verdigris); margin: 1.2em 0 .4em; }
.doc-side a { display: block; color: var(--ink); text-decoration: none; padding: .22rem 0; border-left: 2px solid transparent; padding-left: .6rem; }
.doc-side a:hover { color: var(--crimson); border-left-color: var(--crimson); }
.doc-side a.active { color: var(--pine); font-weight: 600; border-left-color: var(--pine); }
.doc-main { min-width: 0; max-width: 760px; }
.doc-main > p, .doc-main > ul, .doc-main > ol { font-size: 1rem; }

/* ---- breadcrumb ---- */
.crumb { font-size: .82rem; font-family: var(--mono); color: #5c6b67; margin-bottom: .4rem; }
.crumb a { color: var(--verdigris); text-decoration: none; }

/* ---- cards / callouts ---- */
.card { background: #fffdf8; border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.4rem; margin: 1.2rem 0; }
.lede { font-size: 1.12rem; color: #34403d; }
.note, .tip, .warn, .deferred { border-radius: 10px; padding: .8rem 1.1rem; margin: 1.1rem 0; font-size: .95rem; border: 1px solid var(--line); }
.note { background: rgba(28,93,90,.07); border-left: 4px solid var(--verdigris); }
.tip { background: rgba(28,93,90,.10); border-left: 4px solid var(--pine); }
.warn { background: #fbeceb; border-left: 4px solid var(--crimson); }
.deferred { background: #f3efe2; border-left: 4px solid #b08a2e; }
.note strong, .tip strong, .warn strong, .deferred strong { font-family: var(--sans); }
.badge { display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: .12rem .5rem; border-radius: 5px; vertical-align: middle; }
.badge.free { background: rgba(28,93,90,.15); color: var(--pine); }
.badge.pro { background: var(--pine); color: var(--parchment); }
.badge.cloud { background: #e7dcc2; color: #6b551d; }
.badge.deferred { background: #f0e0bd; color: #6b551d; }
.badge.live { background: var(--crimson); color: #fff; }

/* ---- tables ---- */
table.t { width: 100%; border-collapse: collapse; margin: 1.1rem 0; font-size: .92rem; }
table.t th, table.t td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { background: #f4efe6; font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: #5c6b67; }
table.t tr:last-child td { border-bottom: none; }

/* ---- ordered step lists ---- */
ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 2.4rem; margin: .7rem 0; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: -.05rem; width: 1.7rem; height: 1.7rem; background: var(--pine); color: var(--parchment); border-radius: 50%; font-family: var(--mono); font-size: .85rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }

/* ---- card grid for the index ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin: 1.4rem 0; }
.grid a.tile { display: block; background: #fffdf8; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); transition: transform .08s ease, box-shadow .08s ease; }
.grid a.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,61,62,.10); }
.grid a.tile strong { font-family: var(--serif); color: var(--pine); font-size: 1.08rem; display: block; margin-bottom: .25rem; }
.grid a.tile span { font-size: .88rem; color: #54615d; }

kbd { font-family: var(--mono); font-size: .82em; background: #fffdf8; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: .05em .4em; }
hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
.pagenav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .92rem; }
.pagenav a { text-decoration: none; }

footer.doc-foot { background: var(--pine); color: var(--sage); margin-top: 2rem; }
footer.doc-foot .fwrap { max-width: 1120px; margin: 0 auto; padding: 1.6rem 1.2rem; font-size: .85rem; }
footer.doc-foot a { color: var(--parchment); }

@media (max-width: 820px) {
  .doc-wrap { grid-template-columns: 1fr; }
  .doc-side { position: static; max-height: none; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1rem; }
}
