/* RouteGenie brand: Corporate Identity Guide (colors, Montserrat, logo rules). */
:root {
  --rg-teal: #0d6e95;
  --rg-teal-deep: #0a5a7a;
  --rg-blue: #00b7e8;
  --rg-orange: #ff9c00;

  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #cbd5e0;
  --ink: #333333;
  --muted: #5a6573;
  --heading: #0d6e95;
  --link: #0d6e95;
  --pill-live-bg: #0d6e95;
  --pill-live-ink: #ffffff;

  --font: "Montserrat", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header-h: 123px; /* brand bar 75px + API bar 48px */
  --scalar-custom-header-height: var(--header-h);
  --scalar-font: var(--font);
  color-scheme: light dark;
}
:root[data-theme="dark"] {
  --bg: #0f1419;
  --surface: #161c22;
  --surface-2: #1f272f;
  --border: #26313b;
  --ink: #e6edf3;
  --muted: #a9b4c0;
  --heading: #ffffff;
  --link: #00b7e8;
  --pill-live-bg: #00b7e8;
  --pill-live-ink: #0f1419;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font); }
a { color: var(--link); }

/* Header: dark teal in both modes, reversed logo, bright-blue rule. */
.site-header { position: sticky; top: 0; z-index: 100; }
.site-header .bar {
  height: 72px; display: flex; align-items: center; gap: 24px; padding: 0 20px;
  background: var(--rg-teal); border-bottom: 3px solid var(--rg-blue);
}
.site-header .logo img { height: 36px; display: block; } /* 105px wide: brand minimum is 100px */
.site-header .logo { display: flex; align-items: center; gap: 18px; text-decoration: none; } /* 18px = brand clear space */
.site-header .logo .sub { color: #ffffff; font-size: 18px; font-weight: 600; line-height: 28px; padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .45); white-space: nowrap; }
.site-header nav { display: flex; gap: 24px; margin-left: auto; font-size: 14px; font-weight: 600; }
.site-header nav a { color: #ffffff; text-decoration: none; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--rg-blue); }
.site-header nav .short { display: none; }
@media (max-width: 640px) {
  .site-header .bar { gap: 16px; padding: 0 16px; }
  .site-header nav { gap: 16px; }
  .site-header nav .home, .site-header nav .long { display: none; }
  .site-header nav .short { display: inline; }
}
@media (max-width: 440px) {
  .site-header .bar, .site-header nav { gap: 12px; }
  .site-header .logo .sub { font-size: 15px; padding-left: 12px; }
}


/* Landing page */
main.landing { max-width: 1040px; margin: 0 auto; padding: 56px 16px 72px; }
.landing h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; font-weight: 700; color: var(--heading); margin: 0 0 12px; }
.landing .lede { color: var(--muted); font-size: 18px; max-width: 60ch; margin: 0 0 40px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--rg-blue);
  border-radius: 10px; padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.card h2 { font-size: 22px; font-weight: 700; margin: 0; color: var(--heading); }
.card p { margin: 0; color: var(--muted); }
.card .actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.button {
  display: inline-block; background: var(--rg-orange); color: #1f1f1f; text-decoration: none;
  padding: 10px 18px; border-radius: 8px; font-weight: 700;
}
.button:hover { filter: brightness(1.06); }
.button.secondary { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1.5px var(--link); }
.button.secondary:hover { background: var(--surface-2); filter: none; }
.pill { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.pill.live { background: var(--pill-live-bg); color: var(--pill-live-ink); }
.pill.preview { border: 1.5px solid var(--rg-orange); color: var(--ink); }
.landing section { margin-top: 56px; }
.landing section h2 { font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--heading); margin: 0 0 10px; }
.landing section p { margin: 0 0 8px; max-width: 70ch; }

.site-footer { border-top: 3px solid var(--rg-blue); padding: 20px 16px; text-align: center; font-size: 14px; color: var(--muted); }

/* "Use in Postman" copy-link box on each card */
.postman { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.postman label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--heading); }
.postman input {
  width: 100%; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px;
}
.postman .file-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.postman button, .postman .file-actions a {
  font: 600 14px var(--font); cursor: pointer; white-space: nowrap; padding: 8px 16px; border-radius: 8px; text-decoration: none;
  background: transparent; color: var(--link); border: 1.5px solid var(--link);
}
.postman button:hover, .postman .file-actions a:hover { background: var(--surface-2); }
.postman .hint { font-size: 14px; }

/* API bar: which API you are in, and its Guide / API reference tabs */
.api-bar {
  height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.api-bar .api-name { font-weight: 700; color: var(--heading); white-space: nowrap; }
.api-bar .pill { align-self: center; }
.api-bar nav { display: flex; gap: 4px; margin-left: 12px; }
.api-bar nav a { padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.api-bar nav a:hover { color: var(--heading); }
.api-bar nav a[aria-current="page"] { background: var(--surface-2); color: var(--heading); }
@media (max-width: 640px) { .api-bar { padding: 0 16px; } .api-bar .api-name { display: none; } .api-bar nav { margin-left: 0; } }

/* Guide pages: sidebar and content use the same colors and sizes as the API reference (Scalar, see scalar-theme.js) */
body.guide-page {
  --g-bg1: #ffffff; --g-bg2: #f8fafc; --g-bg3: #f1f5f9; --g-c1: #333333; --g-c2: #5a6573; --g-c3: #7a8594; --g-border: #e2e8f0;
  background: var(--g-bg1); color: var(--g-c1);
}
[data-theme="dark"] body.guide-page { --g-bg1: #0f1419; --g-bg2: #161c22; --g-bg3: #1f272f; --g-c1: #e6edf3; --g-c2: #a9b4c0; --g-c3: #7d8996; --g-border: #26313b; }
.guide-shell { display: grid; grid-template-columns: 288px minmax(0, 1fr); }
.guide-sidebar {
  position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto;
  border-right: 1px solid var(--g-border); padding: 12px; background: var(--g-bg1);
}
.guide-search {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; margin-bottom: 12px;
  background: var(--g-bg2); border: 1px solid var(--g-border); border-radius: 6px; color: var(--g-c3); cursor: text;
}
.guide-search svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }
.guide-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 14px var(--font); color: var(--g-c1); padding: 0; }
.guide-search input::placeholder { color: var(--g-c3); }
.guide-search input::-webkit-search-cancel-button { display: none; }
.guide-search kbd { font: 11px var(--font); color: var(--g-c2); border: 1px solid var(--g-border); border-radius: 4px; padding: 1px 5px; }
.toc { font-size: 14px; }
.toc-group-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 8px; border-radius: 6px; color: var(--g-c2); text-decoration: none; line-height: 1.4;
}
.toc-group-title svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .15s; cursor: pointer; }
.toc-group.open .toc-group-title svg { transform: rotate(90deg); }
.toc-group ul { display: none; list-style: none; margin: 2px 0 6px 16px; padding: 0; border-left: 1px solid var(--g-border); }
.toc-group.open ul { display: block; }
.toc li a { display: block; padding: 7px 12px; border-radius: 6px; color: var(--g-c2); text-decoration: none; line-height: 1.4; }
.toc a:hover { background: var(--g-bg2); color: var(--g-c1); }
.toc a.active { background: var(--g-bg2); color: var(--g-c1); }
.guide-main { min-width: 0; padding: 48px 60px 96px; }
.toc-toggle { display: none; }
.guide { max-width: 760px; }
.guide h2, .guide h3 { scroll-margin-top: calc(var(--header-h) + 16px); color: var(--g-c1); font-weight: 500; }
.guide h2 { font-size: 26px; line-height: 1.25; margin: 64px 0 16px; padding-top: 40px; border-top: 1px solid var(--g-border); }
.guide h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.guide h3 { font-size: 20px; margin: 40px 0 12px; }
.guide p, .guide li { max-width: 72ch; }
.guide li { margin: 4px 0; }
.guide a { color: var(--link); }
.guide code { font: 0.88em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--g-bg3); padding: 2px 5px; border-radius: 4px; }
.guide pre { background: #1f2329; color: #e6edf3; border-radius: 8px; padding: 14px 16px; overflow-x: auto; }
.guide pre code { background: none; color: inherit; padding: 0; font-size: 13.5px; }
.guide table { border-collapse: collapse; width: 100%; margin: 12px 0 20px; font-size: 15px; display: block; overflow-x: auto; }
.guide th, .guide td { border: 1px solid var(--g-border); padding: 8px 12px; text-align: left; vertical-align: top; }
.guide th { background: var(--g-bg2); }
.guide blockquote { margin: 16px 0; padding: 10px 16px; border-left: 4px solid var(--rg-orange); background: var(--g-bg2); border-radius: 0 6px 6px 0; }
.guide blockquote p { margin: 0; }
@media (max-width: 900px) {
  .guide-shell { grid-template-columns: 1fr; }
  .guide-sidebar { display: none; position: fixed; z-index: 90; left: 0; right: 0; top: var(--header-h); height: calc(100vh - var(--header-h)); border-right: 0; }
  .guide-sidebar.shown { display: block; }
  .guide-main { padding: 24px 16px 64px; }
  .toc-toggle {
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; font: 600 14px var(--font);
    color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 7px 12px; cursor: pointer;
  }
}

/* HTTP method chips in the guides, colored like the API reference */
.guide .method {
  display: inline-block; margin-right: 4px; padding: 1px 6px; border-radius: 4px; vertical-align: 1px;
  font: 700 0.75em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em;
  color: var(--method); background: color-mix(in srgb, var(--method) 12%, transparent);
}
.method-get { --method: #0a6ebd; }
.method-post { --method: #0c8a4f; }
.method-put { --method: #c25e00; }
.method-patch { --method: #9a6b00; }
.method-delete { --method: #c4232f; }
[data-theme="dark"] .method-get { --method: #4eb3ec; }
[data-theme="dark"] .method-post { --method: #3fcf7f; }
[data-theme="dark"] .method-put { --method: #ff9e3d; }
[data-theme="dark"] .method-patch { --method: #e5c04b; }
[data-theme="dark"] .method-delete { --method: #ff6b6b; }

/* Light/dark switch in the header */
.theme-toggle {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; cursor: pointer;
  background: transparent; border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 8px; color: #ffffff;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .12); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .icon-sun, [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* "For transportation providers:" before the API links in the header */
.site-header nav .nav-label { color: rgba(255, 255, 255, .75); font-weight: 400; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
@media (max-width: 760px) { .site-header nav .nav-label { display: none; } }
@media (max-width: 420px) {
  .site-header .logo .sub { display: none; }
}
