/* Redque Peppol partner documentation. No build step: every page links this file and site.js. */

:root {
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --bg-code: #f3f4f6;
  --border: #e3e5e8;
  --text: #1c2024;
  --text-muted: #5b636d;
  --brand: #0db9d6;          /* Redque cyan, from the logo */
  --brand-ink: #01092c;      /* Redque navy, from the favicon */
  --accent: var(--brand);
  --accent-text: #087286;
  --link: #08708a;
  --note-bg: #eaf8fb;
  --note-border: #0db9d6;
  --warn-bg: #fdf6e7;
  --warn-border: #b7791f;
  --sandbox: #0f7b4f;
  --sandbox-bg: #e8f5ee;
  --prod: #a50d26;
  --prod-bg: #fbecee;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #01092c;
    --bg-subtle: #0b1438;
    --bg-code: #0f1a44;
    --border: #1f2b5c;
    --text: #e8ebf3;
    --text-muted: #a1a9c2;
    --accent-text: #4fd3ea;
    --link: #4fd3ea;
    --note-bg: #0a2240;
    --note-border: #0db9d6;
    --warn-bg: #2d2513;
    --warn-border: #d9a441;
    --sandbox: #56c995;
    --sandbox-bg: #13291f;
    --prod: #ff8a98;
    --prod-bg: #321a1e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .logo { display: block; height: 24px; width: auto; }
.brand .logo-dark { display: none; }
.brand-product { font-size: 18px; letter-spacing: .01em; color: var(--accent-text); }
.brand small { color: var(--text-muted); font-weight: 500; }
@media (prefers-color-scheme: dark) {
  .brand .logo-light { display: none; }
  .brand .logo-dark { display: block; }
}
.topbar .spacer { flex: 1; }
.topbar .ext { font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.menu-toggle {
  display: none;
  border: 1px solid var(--border); background: var(--bg-subtle); color: var(--text);
  border-radius: 6px; padding: 4px 10px; font: inherit; font-size: 14px; cursor: pointer;
}

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); max-width: 1280px; margin: 0 auto; }

.sidebar {
  position: sticky; top: 56px; align-self: start;
  height: calc(100vh - 56px); overflow-y: auto;
  padding: 24px 16px 40px 24px;
  border-right: 1px solid var(--border);
  font-size: 15px;
}
.sidebar h4 {
  margin: 20px 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a {
  display: block; padding: 5px 10px; border-radius: 6px; color: var(--text);
}
.sidebar li a:hover { background: var(--bg-subtle); text-decoration: none; }
.sidebar li a[aria-current="page"] { background: var(--bg-subtle); color: var(--accent-text); font-weight: 600; }

main { min-width: 0; padding: 40px 48px 80px; }
article { max-width: 800px; }

/* ---------- Typography ---------- */
h1 { font-size: 34px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 24px; margin: 48px 0 12px; padding-top: 8px; border-top: 1px solid var(--border); }
h3 { font-size: 18px; margin: 32px 0 8px; }
.lead { font-size: 19px; color: var(--text-muted); margin: 0 0 32px; }
p, ul, ol { margin: 0 0 16px; }
li { margin: 4px 0; }
strong { font-weight: 650; }

code {
  font-family: var(--mono); font-size: .875em;
  background: var(--bg-code); padding: .1em .35em; border-radius: 4px;
  overflow-wrap: anywhere;
}
pre {
  position: relative;
  margin: 0 0 20px; padding: 14px 16px;
  background: var(--bg-code); border: 1px solid var(--border); border-radius: 8px;
  overflow-x: auto; font-size: 13.5px; line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.copy {
  position: absolute; top: 8px; right: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text-muted);
  border-radius: 5px; padding: 2px 8px; font: 12px var(--sans); cursor: pointer; opacity: 0; transition: opacity .15s;
}
pre:hover .copy, .copy:focus { opacity: 1; }

.table-wrap { overflow-x: auto; margin: 0 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--border); }
th { font-weight: 600; background: var(--bg-subtle); }

/* ---------- Components ---------- */
.callout {
  margin: 0 0 20px; padding: 12px 16px;
  background: var(--note-bg); border-left: 3px solid var(--note-border); border-radius: 0 6px 6px 0;
}
.callout.warn { background: var(--warn-bg); border-left-color: var(--warn-border); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; vertical-align: middle;
}
.badge.sandbox { color: var(--sandbox); background: var(--sandbox-bg); }
.badge.prod { color: var(--prod); background: var(--prod-bg); }

/* OpenPeppol certification badge: shown as supplied (white artwork), so it keeps its own background in dark mode too. */
.certification {
  display: flex; align-items: center; gap: 20px; margin: 0 0 32px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-subtle);
}
.certification img { flex: none; width: 240px; height: auto; }
.certification p { margin: 0; }
@media (max-width: 560px) {
  .certification { flex-direction: column; align-items: flex-start; }
  .certification img { width: 200px; }
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 0 0 32px; }
.card {
  display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px; color: var(--text);
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card strong { display: block; margin-bottom: 4px; }
.card span { color: var(--text-muted); font-size: 14px; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 40px; margin: 0 0 20px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font-size: 13px; font-weight: 700;
}

.diagram {
  margin: 0 0 24px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-subtle);
  font-family: var(--mono); font-size: 13px; line-height: 1.5; white-space: pre; overflow-x: auto;
}

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--border); }
.pager a { display: block; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager small { display: block; color: var(--text-muted); font-size: 12px; }

footer.site { margin-top: 48px; color: var(--text-muted); font-size: 13px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .layout { display: block; }
  .menu-toggle { display: inline-block; }
  .topbar { padding: 0 16px; }
  .topbar .ext { display: none; }
  .brand small { display: none; }
  .sidebar {
    display: none; position: fixed; top: 56px; left: 0; right: 0; bottom: 0; z-index: 9;
    height: auto; background: var(--bg); border-right: none; padding: 16px;
  }
  body.nav-open .sidebar { display: block; }
  main { padding: 28px 16px 64px; }
  h1 { font-size: 28px; }
}
