/* Northwind API explorer. Ocean theme tokens come from arvion.css. */

:root { --accent-text: #63e6b6; }
a, .eyebrow { color: var(--accent-text); }
body { overflow-x: hidden; }
.api-shell { grid-template-columns: 268px minmax(0, 1fr); }

/* ---------------------------------------------------------------- sidebar */
.api-sidebar {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 56, 71, 0.72), rgba(4, 32, 42, 0.24));
}
.api-sidebar .brand { padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.api-sidebar .brand-mark { border-color: var(--gold-line); color: var(--gold); }
.api-side-scroll { flex: 1; overflow: auto; padding: 0 10px 12px; }
.api-sidebar .nav-label { padding: 16px 8px 6px; }
.endpoint-list { display: flex; flex-direction: column; gap: 2px; }
.endpoint {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: 1px solid transparent; border-radius: 9px; background: transparent;
  padding: 7px 9px; cursor: pointer; text-align: left;
  color: var(--text-2); font: 500 12.5px/1.3 var(--font-sans);
}
.endpoint:hover { background: rgba(200, 255, 245, 0.05); color: var(--text); }
.endpoint.active { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.endpoint .method {
  font: 700 8.5px/1 var(--font-mono); letter-spacing: 0.04em;
  border-radius: 4px; padding: 3px 4px; flex: none;
}
.endpoint .method.get { color: var(--blue); background: var(--blue-soft); border: 1px solid rgba(92, 184, 255, 0.3); }
.endpoint .method.post { color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-line); }
.endpoint .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot { margin: 0 14px 14px; }
.side-foot b { color: var(--text); }

/* ---------------------------------------------------------------- topbar */
.api-crumb { font-size: 12.5px; color: var(--text-2); display: flex; gap: 8px; align-items: center; }
.api-crumb .sep { color: var(--muted); }
.api-main { padding: 24px 30px 80px; max-width: 1280px; }

/* ---------------------------------------------------------------- hero */
.api-hero { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; margin-bottom: 18px; }
.api-hero h1 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.06; letter-spacing: -0.03em; margin: 4px 0 8px; }
.api-hero h1 em { font-style: normal; color: var(--accent-text); }
.api-hero .lede { color: var(--muted); max-width: 74ch; margin: 0; font-size: 14px; }
.api-facts { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; font-size: 11.5px; color: var(--muted); }
.api-facts b { color: var(--text); font-family: var(--font-display); font-size: 17px; margin-right: 4px; }

/* ---------------------------------------------------------------- explorer */
.explorer { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 16px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.panel-head .spacer { flex: 1; }
.req-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.method-pill { font: 700 10px/1 var(--font-mono); padding: 7px 8px; border-radius: 7px; flex: none; }
.method-pill.get { color: var(--blue); background: var(--blue-soft); border: 1px solid rgba(92, 184, 255, 0.32); }
.method-pill.post { color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-line); }
.req-url {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2);
  background: rgba(4, 20, 27, 0.6); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.req-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.endpoint-desc { font-size: 12.5px; color: var(--muted); margin: 0 0 4px; line-height: 1.5; }
.param-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.param { display: flex; flex-direction: column; gap: 4px; }
.param label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.param label .required { color: var(--red); margin-left: 3px; }
.param .input, .param .select { padding: 8px 9px; font-size: 11.5px; font-family: var(--font-mono); }
.body-editor { display: flex; flex-direction: column; gap: 4px; }
.body-editor label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.body-editor textarea {
  width: 100%; min-height: 132px; resize: vertical;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.65;
  background: #03171d; color: #bfe8e2; border: 1px solid var(--line-strong); border-radius: 9px; padding: 10px 11px;
}
.body-editor textarea:focus { outline: none; border-color: var(--gold-line); box-shadow: 0 0 0 3px rgba(99, 230, 182, 0.1); }
.req-actions { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.req-actions .note { margin-left: auto; font-size: 10px; color: var(--muted); }
.error-text { color: var(--red) !important; }

.resp-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 11px; }
.status-pill { font: 700 11px/1 var(--font-mono); padding: 5px 8px; border-radius: 6px; }
.status-pill.ok { color: var(--green); background: var(--green-soft); border: 1px solid rgba(99, 230, 182, 0.35); }
.status-pill.created { color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-line); }
.status-pill.problem { color: var(--red); background: var(--red-soft); border: 1px solid rgba(255, 123, 123, 0.4); }
.timing { color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }
.resp-tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.resp-tab { border: 0; background: transparent; color: var(--muted); font: 600 11px/1 var(--font-sans); padding: 7px 10px; border-radius: 7px 7px 0 0; cursor: pointer; }
.resp-tab.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--gold); }
.resp-body { margin: 0; padding: 14px 16px; max-height: 520px; overflow: auto; background: #041c24; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7; }
.resp-body .j-key { color: var(--gold); }
.resp-body .j-str { color: #9fe8d8; }
.resp-body .j-num { color: #8dc5ff; }
.resp-body .j-bool { color: #ffd166; }
.resp-body .j-null { color: var(--muted); }
.resp-body .j-punct { color: #5f8f8b; }
.problem-callout { background: var(--red-soft); border-bottom: 1px solid rgba(255, 123, 123, 0.3); padding: 10px 16px; font-size: 12px; color: var(--red); }
.problem-callout b { color: var(--text); }
.headers-view { padding: 14px 16px; }
.headers-view .kv { grid-template-columns: 180px 1fr; }
.headers-view .kv dt { color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }
.headers-view .kv dd { text-align: left; font-size: 11px; color: var(--text-2); word-break: break-all; }

/* ---------------------------------------------------------------- sections */
.api-section { margin-top: 34px; }
.api-section h2 { font-size: 20px; margin: 0 0 8px; }
.api-section > p { color: var(--muted); font-size: 13px; max-width: 80ch; margin: 0 0 14px; }
.mirror-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mirror-card { padding: 16px; }
.mirror-card h3 { margin: 0 0 6px; font-size: 13.5px; }
.mirror-card p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.55; }
.rule-chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 10px 0 0; }
.rule-chips span { font-family: var(--font-mono); font-size: 10px; color: var(--text-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; }
.run-note { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.run-note .card { padding: 16px; }
.run-note h3 { margin: 0 0 8px; font-size: 14px; }
.run-note p { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.run-note pre.code { font-size: 10.5px; margin: 0; white-space: pre-wrap; word-break: break-word; }

/* ---------------------------------------------------------------- problems view */
.problem-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.problem-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.problem-card .pc-head { padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.problem-card .pc-head .code { font: 700 11px/1 var(--font-mono); }
.problem-card .pc-head h3 { margin: 6px 0 0; font-size: 14px; }
.problem-card .pc-head p { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); }
.problem-card pre { margin: 0; padding: 14px 16px; font-family: var(--font-mono); font-size: 10.5px; line-height: 1.65; color: #bfe8e2; overflow: auto; max-height: 300px; white-space: pre-wrap; word-break: break-word; }
.problem-card .pc-foot { margin-top: auto; padding: 10px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.problem-card .pc-foot span { font-size: 10.5px; color: var(--muted); }

/* ---------------------------------------------------------------- openapi view */
.schema-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.schema-card { padding: 14px 16px; }
.schema-card h3 { margin: 0 0 8px; font-size: 13px; font-family: var(--font-mono); color: var(--accent-text); }
.schema-card .prop { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.schema-card .prop:last-child { border-bottom: 0; }
.schema-card .prop span:first-child { color: var(--text-2); }
.schema-card .prop span:last-child { color: var(--muted); font-family: var(--font-mono); font-size: 10px; text-align: right; }
.paths-table td { vertical-align: top; }
.paths-table .method { font-family: var(--font-mono); font-size: 10px; font-weight: 700; }
.paths-table .method.get { color: var(--blue); }
.paths-table .method.post { color: var(--gold); }
.paths-table code { font-size: 11px; }

.api-footer { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--muted); }
.api-footer a { color: var(--muted); }
.api-footer .spacer { flex: 1; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1120px) {
  .explorer { grid-template-columns: 1fr; }
  .mirror-grid, .problem-grid, .schema-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .api-facts { margin-left: 0; }
}
@media (max-width: 860px) {
  .api-shell { grid-template-columns: 1fr; }
  .api-sidebar { display: none; }
  .api-main { padding: 18px 16px 70px; }
  .param-grid { grid-template-columns: 1fr; }
  .run-note { grid-template-columns: 1fr; }
  .mirror-grid, .problem-grid, .schema-grid { grid-template-columns: 1fr; }
  .api-topbar .badge { display: none; }
}
@media (max-width: 520px) {
  .api-hero h1 { font-size: 28px; }
  .req-bar { flex-wrap: wrap; }
  .req-url { flex-basis: 100%; order: 3; }
  .api-main { padding: 14px 12px 70px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* The capture script adds .shot so chrome like the gallery banner is hidden. */
.shot .demo-banner { display: none !important; }
