/* VesselFinder API docs: base styles
   Palette taken from vesselfinder.com */
:root {
  --navy: #112d5a;        /* VF navbar */
  --navy-deep: #0c2146;   /* code panels */
  --navy-line: #1f3d6e;
  --blue: #4481e4;        /* VF links / active */
  --blue-dark: #254881;   /* VF link hover */
  --sky-1: #b2d9f6;       /* logo light */
  --sky-2: #82b7e6;       /* logo mid */
  --sky-3: #6694ce;       /* logo dark */
  --water: #eaf2fb;       /* tint of VF map water #b4ceec */
  --ink: #222;
  --ink-2: #555;
  --ink-3: #777;
  --rule: #e3e8ef;
  --paper: #fff;
  --amber: #f80;          /* VF accent, used only on dark */
  --req: #b54708;

  --sans: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu,
          Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --nav-h: 46px;
  --side-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; font: 400 13.5px/1.6 var(--sans); color: var(--ink); background: var(--paper); }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
code, pre, kbd { font-family: var(--mono); font-size: .875em; }
:not(pre) > code { background: var(--water); color: var(--navy); padding: .1em .35em; border-radius: 3px; }

/* ---------- top bar (mirrors vesselfinder.com navbar) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h); display: flex; align-items: center; gap: 12px;
  padding: 0 16px 0 6px; background: var(--navy); color: #fff;
}
.brand { display: flex; align-items: center; color: #fff; }
.brand:hover { text-decoration: none; color: #fff; }
.brand img { display: block; height: 46px; }
.topbar-title { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 500; font-size: 18px; color: #fff; white-space: nowrap; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font: inherit; font-size: 14px; padding: 0 12px; height: var(--nav-h); cursor: pointer; }
@media (hover: hover) { .menu-toggle:hover { background: var(--blue); } }
/* hamburger icon; turns into a cross when the menu is open */
.menu-toggle { width: 46px; padding: 0; }
.bars, .bars::before, .bars::after {
  display: block; width: 20px; height: 2px; background: #fff; border-radius: 1px;
  transition: transform .2s ease, background-color .2s ease;
}
.bars { position: relative; margin: 0 auto; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100vh - var(--nav-h)); }
.sidebar {
  position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto;
  border-right: 1px solid var(--rule); padding: 12px 0 40px; font-size: 13.5px; background: #fbfcfe;
}
.side-group { margin: 0 0 14px; }
.side-group h2 { margin: 0 0 4px; padding: 5px 16px; font-size: 12.5px; font-weight: 600; color: var(--navy); background: #e6edf6; border-top: 1px solid #d6e0ec; border-bottom: 1px solid #d6e0ec; }
.side-group ul { list-style: none; margin: 0; padding: 0; }
.side-group a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 3px 16px 3px 13px; border-left: 3px solid transparent; color: var(--ink-2);
}
.side-group a:hover { color: var(--navy); background: var(--water); text-decoration: none; }
.side-group a[aria-current="page"] { border-left-color: #33af2c; color: #1d4d2b; font-weight: 600; background: #e2f4e5; }
.side-group .hint { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.side-toc { list-style: none; margin: 2px 0 6px; padding: 0; }
.side-toc a { padding-left: 28px; font-size: 13px; border-left-color: transparent; background: none; font-weight: 400; }
.side-toc a.is-active { color: var(--blue); }

/* ---------- content ---------- */
.page { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 1fr); gap: 48px; padding: 40px 48px 96px; }
.doc { min-width: 0; }
.aside-code { min-width: 0; }
.aside-code .sticky { position: sticky; top: calc(var(--nav-h) + 24px); }

.doc h1 { font-size: 28px; line-height: 1.15; margin: 0 0 12px; color: var(--navy); font-weight: 700; letter-spacing: -.01em; }
.doc h2 { font-size: 18px; line-height: 1.3; margin: 36px 0 8px; color: var(--navy); font-weight: 650; }
.doc h3 { font-size: 15px; margin: 28px 0 8px; color: var(--navy); }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 20px; }
.doc li { margin: 3px 0; }
.lede { color: var(--ink-2); }
.doc h2 .anchor, .doc h3 .anchor { opacity: 0; margin-left: 6px; font-weight: 400; color: var(--ink-3); }
.doc h2:hover .anchor, .doc h3:hover .anchor { opacity: 1; }

/* endpoint line */
.endpoint {
  display: flex; align-items: center; gap: 10px; margin: 20px 0 8px;
  border: 1px solid var(--rule); border-radius: 6px; padding: 8px 8px 8px 10px; background: #fff;
  font-family: var(--mono); font-size: 13px;
}
.method { font: 700 12px/1 var(--mono); padding: 5px 7px; border-radius: 3px; background: var(--navy); color: var(--sky-1); }
.endpoint .url { color: var(--ink-2); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.endpoint .url b { color: var(--navy); font-weight: 600; }

.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-2); margin: 8px 0 0; }
.meta strong { color: var(--ink); font-weight: 600; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 1em; margin: 8px 0 18px; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); }
.tbl td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl td:last-child, .tbl th:last-child { padding-right: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.params .p-name { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; }
.params .p-type { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.params .p-req { display: block; font-size: 12.5px; color: var(--req); margin-top: 2px; }
.params .p-desc p { margin: 0 0 4px; }
.params .p-vals { font-size: 13.5px; color: var(--ink-2); }

.tbl-wrap { overflow-x: auto; margin: 8px 0 6px; }
.tbl-wrap .tbl { margin: 0; }
.tbl-matrix th[scope="row"] { text-align: left; font-size: 1em; color: var(--ink); font-weight: 600; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tbl-matrix td { color: var(--ink); vertical-align: middle; }
.tbl-defs td, .tbl-defs th { vertical-align: top; }
.tbl-headers th[scope="row"] { width: 1%; padding-right: 24px; font-weight: 400; }
.tbl-headers th[scope="row"] code { white-space: nowrap; }
.tbl-fields th[scope="row"] { width: 1%; padding-right: 20px; font-weight: 400; }
.tbl-fields th[scope="row"] code { background: none; padding: 0; font-weight: 600; color: var(--navy); }
.tbl-fields td.type { width: 1%; padding-right: 20px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
/* Several field tables on one page (Status): same column widths so they line up */
@media (min-width: 860px) {
  .tbl-aligned th[scope="row"] { width: 170px; }
  .tbl-aligned td.type { width: 90px; }
}
.tbl tr.group th { font-size: 12.5px; font-weight: 600; color: var(--navy); background: #f2f6fb; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.tbl-matrix .c { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; width: 64px; padding-left: 4px; padding-right: 4px; }
.tbl-matrix .na { color: #b8c0cc; }
.tbl-matrix th[scope="row"] { width: 150px; }
.tbl-defs th[scope="row"] { width: 110px; padding-right: 20px; vertical-align: top; }
.tbl-matrix .is-default, .key-default { background: var(--water); color: var(--navy); font-weight: 700; }
.key-default { padding: 1px 5px; border-radius: 3px; font-weight: 600; }
@media (max-width: 600px) { .tbl-matrix .desc { display: none; } .tbl-matrix .c { width: auto; } .tbl-defs th[scope="row"] { width: auto; } }
.tbl-note { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 14px; padding-left: 18px; }
.tbl-note li { margin: 2px 0; }

.defs { margin: 8px 0 0; }
.defs dt { font-weight: 600; margin-top: 14px; }
.defs dd { margin: 2px 0 0; }

.download { display: inline-block; font-weight: 600; padding: 6px 12px; border: 1px solid var(--blue); border-radius: 5px; }
.download:hover { background: var(--blue); color: #fff; text-decoration: none; }

.note { border-left: 3px solid var(--sky-2); background: var(--water); padding: 10px 14px; margin: 14px 0; border-radius: 0 4px 4px 0; }
.note p:last-child { margin: 0; }

/* collapsible dataset field lists */
details.fields { border: 1px solid var(--rule); border-radius: 6px; margin: 10px 0; background: #fff; }
details.fields > summary {
  cursor: pointer; padding: 10px 14px; list-style: none; display: flex; align-items: baseline; gap: 10px;
}
details.fields > summary::-webkit-details-marker { display: none; }
details.fields > summary::before { content: "▸"; color: var(--ink-3); transition: transform .15s; display: inline-block; }
details.fields[open] > summary::before { transform: rotate(90deg); }
details.fields .key { font-family: var(--mono); font-weight: 600; color: var(--navy); }
details.fields .when { font-size: 13.5px; color: var(--ink-3); }
details.fields .inner { padding: 0 14px 6px; }
details.fields .tbl { margin: 0; font-size: 14px; }
details.fields .tbl td:first-child { font-family: var(--mono); font-size: 13.5px; color: var(--navy); white-space: nowrap; width: 1%; }
details.fields .tbl td:nth-child(2) { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); white-space: nowrap; width: 1%; }

/* ---------- code panels: light blue, matching the sidebar group headings ---------- */
.code {
  background: #eef4fb; color: var(--ink); border-radius: 8px; margin: 12px 0 22px;
  border: 1px solid #d6e0ec; overflow: hidden;
}
.code-bar { display: flex; align-items: center; border-bottom: 1px solid #d6e0ec; background: #e3ecf7; padding: 0 6px 0 4px; min-height: 38px; }
.code-title { font-size: 12.5px; color: var(--ink-3); padding: 0 10px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 2px; }
.tab {
  font: 500 13px/1 var(--sans); color: var(--ink-3); background: none; border: 0; padding: 12px 10px 10px;
  border-bottom: 2px solid transparent; cursor: pointer;
}
.tab:hover { color: var(--navy); }
.tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--blue); }
.copy {
  margin-left: auto; font: 500 12.5px/1 var(--sans); color: var(--ink-2); background: #fff;
  border: 1px solid #d6e0ec; border-radius: 4px; padding: 6px 9px; cursor: pointer; flex: none;
}
.copy:hover { color: var(--navy); border-color: var(--blue); }
.copy.done { color: #1d4d2b; border-color: #33af2c; background: #e2f4e5; }
.code pre { margin: 0; padding: 14px 16px 16px; overflow: auto; font-size: 13px; line-height: 1.6; max-height: 680px; tab-size: 2; }
.code [role="tabpanel"][hidden] { display: none; }
.tok-key { color: var(--blue-dark); }
.tok-str { color: #2f7a3a; }
.tok-num { color: #b45309; }
.tok-lit { color: #8a3ab9; }
.tok-punc { color: #7a8699; }
.tok-com { color: #7a8699; font-style: italic; }
.tok-attr { color: var(--blue); }
.tok-tag { color: var(--blue-dark); }

.example-req { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); padding: 10px 16px 0; overflow-x: auto; white-space: nowrap; }
.example-req b { color: var(--navy); font-weight: 600; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 15px; }
.pager span { display: block; font-size: 13px; color: var(--ink-3); }

/* reference tables */
.tbl-ref th[scope="row"] { width: 140px; font-weight: 400; }
.tbl-ref th[scope="row"] code { background: none; padding: 0; font-weight: 600; color: var(--navy); }

/* method pages */
.tbl-params th[scope="row"] { width: 1%; padding-right: 20px; font-weight: 400; }
.tbl-params th[scope="row"] code { background: none; padding: 0; font-weight: 600; color: var(--navy); }
.tbl-params td.type { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.tbl-datasets th[scope="row"] { width: 90px; }
.tbl-datasets .c { width: 64px; }
.code .example-req {
  background: #f7fafd; border-bottom: 1px solid #d6e0ec; padding: 9px 14px; font-family: var(--mono);
  font-size: 12.5px; color: var(--ink-2); white-space: normal; overflow-wrap: anywhere;
}
.code .example-req .method { margin-right: 8px; font-size: 11px; padding: 3px 6px; }

/* site footer */
.content { display: flex; flex-direction: column; min-width: 0; }
.content > .page { flex: 1; }
.site-footer { border-top: 1px solid var(--rule); background: var(--paper); }
.site-footer-row { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0; padding: 6px 38px; }
.site-footer a { color: var(--ink-3); font-size: 12.5px; line-height: 20px; padding: 0 10px; }
.site-footer a:hover { color: var(--blue-dark); }

/* ---------- responsive ---------- */
@media (max-width: 1279px) {
  .page { grid-template-columns: minmax(0, 760px); padding: 32px 36px 80px; }
  .aside-code .sticky { position: static; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .menu-toggle { display: block; margin-left: -6px; }
  .sidebar {
    position: fixed; inset: var(--nav-h) 0 0 0; width: 100%; height: auto; z-index: 40;
    transform: translateX(-100%); transition: transform .2s ease; border-right: 0;
  }
  body.nav-open .sidebar { transform: none; }
  .sidebar { font-size: 16px; padding-top: 8px; }
  .side-group a { padding-top: 8px; padding-bottom: 8px; }
  .side-group h2 { font-size: 14px; padding-top: 7px; padding-bottom: 7px; }
  body.nav-open { overflow: hidden; }
  .page { padding: 24px 18px 64px; }
  .site-footer-row { justify-content: center; padding: 6px 8px; }
  body { font-size: 14px; }
  .doc h1 { font-size: 28px; }
  .brand img + img { display: none; }
  .topbar-title { position: static; transform: none; margin-left: auto; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .topbar, .sidebar, .copy, .tabs, .site-footer { display: none !important; }
  .layout, .page { display: block; padding: 0; }
}
