/* openapilab — OPYEB studio tokens. No external fonts, no images except inline SVG. */
:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --bg2: #101014;
  --panel: #121216;
  --panel2: #17171c;
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .18);
  --ink: #f5f2ea;
  --muted: #b3ac9f;
  --muted2: #9d968a;
  --accent: #e5b45c;
  --accent-dim: rgba(229, 180, 92, .14);
  --accent-line: rgba(229, 180, 92, .40);
  --accent-strong: #efc172;
  --on-accent: #191104;
  --ok: #86d2ae;
  --ok-dim: rgba(121, 199, 164, .14);
  --warn: #f0b07c;
  --warn-dim: rgba(229, 160, 108, .16);
  --bad: #f0a0a0;
  --bad-dim: rgba(229, 138, 138, .14);
  --info: #a8c6ee;
  --info-dim: rgba(143, 180, 229, .14);
  --panel3: rgba(255, 255, 255, .07);
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, .9);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI",
          "Malgun Gothic", "Noto Sans KR", "Hiragino Kaku Gothic ProN", "Yu Gothic",
          "Microsoft JhengHei", "Helvetica Neue", Arial, "Liberation Sans",
          "DejaVu Sans", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f3ec;
  --bg2: #fbf9f4;
  --panel: #ffffff;
  --panel2: #f3efe6;
  --line: rgba(26, 20, 11, .12);
  --line2: rgba(26, 20, 11, .26);
  --ink: #16120e;
  --muted: #4c4534;
  --muted2: #5b5343;
  --accent: #7a5010;
  --accent-dim: rgba(122, 80, 16, .10);
  --accent-line: rgba(122, 80, 16, .42);
  --accent-strong: #623f0a;
  --on-accent: #fffaf0;
  --ok: #185f45;
  --ok-dim: rgba(24, 95, 69, .10);
  --warn: #7d4611;
  --warn-dim: rgba(125, 70, 17, .11);
  --bad: #96302f;
  --bad-dim: rgba(150, 48, 47, .09);
  --info: #274f83;
  --info-dim: rgba(39, 79, 131, .09);
  --panel3: rgba(26, 20, 11, .06);
  --shadow: 0 18px 40px -28px rgba(60, 46, 22, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .9em; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: 0 0 .45em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 40; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--accent-line); border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; gap: 14px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; color: var(--accent); flex: none; }
.brand-mark svg { width: 22px; height: 22px; display: block; }
.brand-word { font-family: var(--mono); font-size: 15px; color: var(--muted); letter-spacing: .02em; }
.brand-prod { font-weight: 750; font-size: 17px; letter-spacing: -.01em; }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.head-link { font-size: 14px; color: var(--muted); padding: 6px 2px; }
.head-link:hover { color: var(--ink); text-decoration: none; }
.langs { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.langs a {
  font-size: 12px; color: var(--muted); padding: 4px 9px; border-radius: 999px;
  white-space: nowrap;
}
.langs a[aria-current="page"] { background: var(--accent-dim); color: var(--accent); }
.langs a:hover { color: var(--ink); text-decoration: none; }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--line2); background: var(--panel2); color: var(--ink); }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: none; }

/* -------------------------------------------------------------------- hero */
.hero { padding: 46px 22px 22px; }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-dim); border: 1px solid var(--accent-line);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(30px, 4.6vw, 47px); font-weight: 780; letter-spacing: -.03em;
  word-break: keep-all; overflow-wrap: break-word; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { margin-top: 14px; max-width: 800px; color: var(--muted); font-size: 16.5px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 18px 0 0; }
.chips li {
  font-size: 12.5px; color: var(--muted); border: 1px solid var(--line);
  background: var(--panel); padding: 4px 9px; border-radius: 999px;
}

/* --------------------------------------------------------------------- lab */
.lab { margin-top: 8px; }
.lab-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 0 14px;
}
.lab-status { margin: 0; font-size: 13.5px; color: var(--muted); min-height: 1.4em; }
.lab-status.ok { color: var(--ok); }
.lab-status.bad { color: var(--bad); }
.lab-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.select-wrap { display: inline-flex; min-width: 0; }
select {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line2); border-radius: 9px; padding: 7px 10px; max-width: 260px;
}
select:disabled, input:disabled { opacity: .45; cursor: not-allowed; }
.work-grid { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 18px; align-items: start; }
.lower-grid { margin-top: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 0;
}
.card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 16px 10px; border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 15px; font-weight: 700; }
.head-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card-body { padding: 14px 16px 16px; min-width: 0; }
.hint { font-size: 12.5px; color: var(--muted2); margin: 6px 0 0; }
.muted { color: var(--muted2); }
.warn-text { color: var(--warn); min-height: 1.5em; }
.pill {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px;
  white-space: nowrap;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 13.5px; font-weight: 650; color: var(--on-accent);
  background: var(--accent); border: 1px solid var(--accent); border-radius: 9px;
  padding: 9px 15px; cursor: pointer; line-height: 1.2;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2); }
.btn.ghost:hover { background: var(--panel2); }
.btn.sm { font-size: 12.5px; padding: 6px 11px; }
input[type="text"], textarea, input[type="search"] {
  font: inherit; color: var(--ink); background: var(--bg2);
  border: 1px solid var(--line2); border-radius: 9px; padding: 9px 11px; width: 100%;
}
input[type="text"]:focus, textarea:focus, select:focus, input[type="search"]:focus {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
textarea.editor { resize: vertical; line-height: 1.55; }
textarea.mono { font-family: var(--mono); font-size: 12.5px; }
textarea.sm { font-size: 12px; }

.fld { display: block; min-width: 0; }
.fld > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: end; margin-top: 10px; }
.row2 .hint { margin: 0 0 4px; }
.demo-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

.badge {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; line-height: 1;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.badge.ok { color: var(--ok); background: var(--ok-dim); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.badge.warn { color: var(--warn); background: var(--warn-dim); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.badge.bad { color: var(--bad); background: var(--bad-dim); border-color: color-mix(in srgb, var(--bad) 38%, transparent); }
.badge.info { color: var(--info); background: var(--info-dim); border-color: color-mix(in srgb, var(--info) 32%, transparent); }

.tabs { display: flex; gap: 6px; margin: 0 0 8px; flex-wrap: wrap; }
.tab {
  font: inherit; font-size: 11.5px; color: var(--muted2); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; background: transparent; cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }

/* -------------------------------------------------------------- workbench */
#specInput { min-height: 420px; }
#outReport, #outReportJson { min-height: 420px; }
#outReport[hidden], #outReportJson[hidden] { display: none; }
.area-note { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.area-note .hint { margin: 0; }

.diag-list { list-style: none; margin: 0; padding: 0; height: 236px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg2); }
.diag-list li { margin: 0; }
.diag-empty { padding: 10px 12px; color: var(--ok); font-size: 13px; }
.diag-item {
  display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; line-height: 1.45;
}
.diag-item:hover { background: var(--panel2); }
.diag-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.diag-sev { flex: none; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 7px; }
.is-error .diag-sev { color: var(--bad); background: var(--bad-dim); }
.is-warning .diag-sev { color: var(--warn); background: var(--warn-dim); }
.is-info .diag-sev { color: var(--info); background: var(--info-dim); }
.diag-pos { flex: none; font-family: var(--mono); font-size: 11px; color: var(--accent); }
.diag-msg { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.diag-code { flex: none; font-family: var(--mono); font-size: 10.5px; color: var(--muted2); }

.type-wrap { height: 236px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg2); }
.type-table { width: 100%; min-width: 0; font-size: 12px; margin: 0; table-layout: fixed; }
.type-table th { position: sticky; top: 0; z-index: 1; }
.type-table th:nth-child(1) { width: 46%; }
.type-table th:nth-child(2) { width: 26%; }
.type-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.type-table td:first-child { word-break: break-all; }
.tpill { display: inline-block; font-size: 10.5px; color: var(--info); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); background: var(--info-dim); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }

.opt-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.opt-row .fld { min-width: 130px; }
.check {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink);
  padding: 7px 0; cursor: pointer;
}
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.warn-list { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--warn); }
.warn-list li { margin: 0 0 4px; }

.lab-foot-note { margin: 14px 0 0; }

/* --------------------------------------------------------------- sections */
.section { padding: 34px 22px 6px; }
.section > h2, .section-head h2 { font-size: 22px; font-weight: 730; margin-bottom: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.more { font-size: 13px; }
.lead { color: var(--muted); max-width: 780px; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.step-n { font-family: var(--mono); font-size: 11px; color: var(--accent); display: block; margin-bottom: 6px; }
.step b { display: block; font-size: 15px; margin-bottom: 4px; }
.step p { margin: 0; font-size: 13px; color: var(--muted); }
.feats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.feat h3 { font-size: 14.5px; margin-bottom: 6px; }
.feat p { margin: 0; font-size: 13px; color: var(--muted); }
.why { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 30px; }
.why-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0 0; }
.why-item h3 { font-size: 14.5px; margin-bottom: 5px; color: var(--accent); }
.why-item p { margin: 0; font-size: 13px; color: var(--muted); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 14.5px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+ "; color: var(--accent); font-family: var(--mono); }
.faq details[open] summary::before { content: "− "; }
.faq details p { margin: 8px 0 2px; color: var(--muted); font-size: 13.5px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0 22px; }
.guide-card {
  display: flex; flex-direction: column; gap: 5px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; color: var(--ink);
}
.guide-card:hover { border-color: var(--accent-line); text-decoration: none; }
.g-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; color: var(--accent); text-transform: uppercase; }
.guide-card b { font-size: 14.5px; line-height: 1.4; }
.guide-card span:last-child { font-size: 12.5px; color: var(--muted2); }
.cta-box {
  margin: 34px 22px; padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--accent-line); background: var(--accent-dim); text-align: center;
}
.cta-box h2 { font-size: 20px; margin-bottom: 6px; }
.cta-box p { color: var(--muted); font-size: 13.5px; max-width: 640px; margin: 0 auto 12px; }
main .cta-box { margin: 26px 0; }

/* --------------------------------------------------------------------- doc */
.doc { padding-top: 38px; padding-bottom: 20px; max-width: 860px; }
.doc h1 { font-size: clamp(27px, 3.6vw, 38px); margin-bottom: 8px; }
.doc .meta { font-size: 12.5px; color: var(--muted2); }
.crumbs { margin-bottom: 10px; }
.doc h2 { font-size: 20px; margin: 30px 0 10px; }
.doc h3 { font-size: 16px; margin: 22px 0 8px; }
.doc p, .doc li { font-size: 14.5px; color: var(--ink); }
.doc ul, .doc ol { margin: 0 0 14px; }
.doc blockquote {
  margin: 16px 0; padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--panel); color: var(--muted); font-family: var(--mono); font-size: 13px;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.note-inline {
  font-size: 13px; color: var(--muted); background: var(--panel);
  border: 1px solid var(--line); border-left: 3px solid var(--accent-line);
  border-radius: 8px; padding: 10px 13px; margin: 18px 0;
}
.tablewrap { overflow-x: auto; margin: 12px 0 18px; }
table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; font-weight: 650; background: var(--panel); }
.related { margin: 22px 0; display: flex; flex-direction: column; gap: 6px; }
.related h2 { font-size: 16px; margin: 0 0 4px; }
.related a { font-size: 14px; }

.not-found { padding: 70px 22px 90px; max-width: 720px; }
.nf-code { font-family: var(--mono); font-size: 14px; color: var(--accent); margin-bottom: 4px; }
.not-found h1 { font-size: 32px; margin-bottom: 10px; }
.nf-links { margin: 18px 0; }
.nf-links li { margin-bottom: 6px; }

/* ------------------------------------------------------------------ footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 44px; padding: 26px 0 34px; color: var(--muted2); }
.foot-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 22px; align-items: start; }
.foot-brand { display: flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 650; font-size: 14px; }
.foot-brand .brand-mark svg { width: 19px; height: 19px; }
.foot-note { font-size: 12.5px; margin: 8px 0 0; max-width: 380px; }
.foot-links { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.foot-links a { color: var(--muted); }
.foot-operator { font-size: 12px; text-align: right; }
.foot-copy { margin: 6px 0 0; color: var(--muted2); }
@media (max-width: 860px) {
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .foot-operator { grid-column: 1 / -1; text-align: left; }
}

/* ----------------------------------------------------------------- mobile */
@media (max-width: 1040px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .lower-grid { grid-template-columns: minmax(0, 1fr); }
  .feats, .steps, .why-list, .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .head-inner { min-height: 56px; gap: 8px; }
  .brand { flex: none; }
  .brand-word { display: none; }
  .brand-prod { font-size: 15px; white-space: nowrap; }
  .head-link { display: none; }
  .head-tools { gap: 6px; }
  .langs { gap: 0; }
  .langs a { padding: 3px 5px; font-size: 10.5px; }
  .icon-btn { padding: 5px 6px; }
}
@media (max-width: 420px) {
  .head-inner { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; row-gap: 4px; }
  .head-tools { width: 100%; justify-content: flex-end; }
  .hero { padding-top: 30px; }
  .work-grid { gap: 14px; }
  .feats, .steps, .why-list, .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .foot-inner { grid-template-columns: 1fr; }
  .doc { padding-top: 26px; }
  #specInput { min-height: 300px; }
  #outReport, #outReportJson { min-height: 340px; }
  .diag-list, .type-wrap { height: 300px; }
}

/* overflow and layout stability */
.doc p, .doc li, .doc dd, .doc h1, .doc h2, .doc h3 { overflow-wrap: anywhere; }
.diag-list, .type-wrap { overflow-y: scroll; scrollbar-gutter: stable; }
#statsPill { width: 148px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#typeCount { width: 82px; text-align: center; white-space: nowrap; }
#sampleSel { max-width: min(360px, 62vw); }
@media (max-width: 520px) { #sampleSel { max-width: 58vw; } }

/* visible scrollbars so fixed-height panels are discoverable */
.diag-list::-webkit-scrollbar, .type-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.diag-list::-webkit-scrollbar-track, .type-wrap::-webkit-scrollbar-track { background: var(--bg); border-radius: 8px; }
.diag-list::-webkit-scrollbar-thumb, .type-wrap::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; }
.diag-list, .type-wrap { scrollbar-color: var(--line2) var(--bg); scrollbar-width: thin; }

/* --------------------------------------------------- openapilab workbench */
/* tomllab ids that no longer exist */
#statsPill { width: auto; min-width: 120px; max-width: 190px; }
#sampleSel { max-width: min(340px, 60vw); }
#fmtPill, #sizePill { min-width: 54px; text-align: center; }
.modes { display: inline-flex; gap: 4px; }
.modes .tab { font-size: 11.5px; padding: 5px 9px; }
.tpl-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.tpl-label { font-size: 11.5px; color: var(--muted2); text-transform: uppercase; letter-spacing: .06em; }
.tpl-row .btn { font-size: 11.5px; padding: 5px 9px; }
.row2 { align-items: start; }
#uaInput { width: 100%; }
#pathInput { width: 100%; }
.panel { min-height: 442px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin: 0 0 8px; font-size: 12.5px; color: var(--muted); min-height: 22px; }
.verdict-list { list-style: none; margin: 0; padding: 0; height: 404px; overflow-y: scroll;
  scrollbar-gutter: stable; scrollbar-color: var(--line2) var(--bg); scrollbar-width: thin; }
.verdict-list::-webkit-scrollbar, .matrix-wrap::-webkit-scrollbar, .struct-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.verdict-list::-webkit-scrollbar-track, .matrix-wrap::-webkit-scrollbar-track,
.struct-wrap::-webkit-scrollbar-track { background: var(--bg); border-radius: 8px; }
.verdict-list::-webkit-scrollbar-thumb, .matrix-wrap::-webkit-scrollbar-thumb,
.struct-wrap::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; }
.verdict-item { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 6px; background: var(--panel2); font-size: 12.5px; }
.v-badge { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line2); color: var(--muted); }
.verdict-item.is-allow .v-badge { color: var(--ok); background: var(--ok-dim); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.verdict-item.is-block .v-badge { color: var(--bad); background: var(--bad-dim); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.verdict-item.is-info .v-badge { color: var(--info); background: var(--info-dim); border-color: color-mix(in srgb, var(--info) 36%, transparent); }
.v-path { font-family: var(--mono); font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.v-rule { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-left: auto; text-align: right; }
.v-line { color: var(--muted2); }
.matrix-wrap { height: 404px; overflow: auto; }
.matrix-wrap table.type-table { table-layout: fixed; }
.matrix-wrap table.type-table th { width: 112px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.matrix-wrap table.type-table th:first-child { width: 132px; }
.matrix-wrap table.type-table th:nth-child(2) { width: 112px; }
.matrix-wrap table.type-table td { text-align: center; white-space: nowrap; }
.matrix-wrap table.type-table.is-llms th { width: 24%; }
.matrix-wrap table.type-table.is-llms th:first-child { width: 28%; }
.matrix-wrap table.type-table.is-llms th:nth-child(2) { width: 24%; }
.matrix-wrap table.type-table.is-llms td { text-align: left; white-space: normal; }
.struct-wrap { height: 268px; overflow: auto; }
.type-table td.cell-allow { color: var(--ok); text-align: center; font-weight: 700; }
.type-table td.cell-block { color: var(--bad); text-align: center; font-weight: 700; }
.a-name { display: block; font-weight: 600; }
.a-kind { display: block; font-size: 10.5px; color: var(--muted2); text-transform: uppercase; letter-spacing: .05em; }
#outReport, #outReportJson { min-height: 402px; }
@media (max-width: 720px) {
  .panel { min-height: 400px; }
  .verdict-list { height: 360px; }
  .matrix-wrap { height: 360px; }
  .struct-wrap { height: 240px; }
  .v-rule { margin-left: 0; text-align: left; }
  #outReport, #outReportJson { min-height: 340px; }
  .lab-bar { align-items: flex-start; }
}


/* ---------------------------------------------------- openapilab panels */
.diag-item {
  width: 100%; text-align: left; font: inherit; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.diag-item:last-child { border-bottom: 0; }
.diag-list { height: 404px; overflow-y: scroll; scrollbar-gutter: stable; }
.diag-list .diag-empty { padding: 10px 12px; color: var(--ok); font-size: 13px; }
.panel { min-height: 442px; }

.ep-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 10px; }
.ep-filters .select-wrap { flex: 0 1 auto; }
.ep-search { flex: 1 1 180px; min-width: 140px; }
.ep-search input { padding: 7px 10px; font-size: 12.5px; }
.ep-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 12px; align-items: start; }
.ep-list-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg2); height: 392px; overflow-y: scroll; scrollbar-gutter: stable; }
.ep-list { list-style: none; margin: 0; padding: 4px; }
.ep-list li { margin: 0; }
.ep-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: center;
  width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 7px;
}
.ep-item:hover { background: var(--panel2); }
.ep-item.is-on { border-color: var(--accent-line); background: var(--accent-dim); }
.ep-path { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.ep-id { grid-column: 2; font-size: 10.5px; color: var(--muted2); overflow-wrap: anywhere; }
.ep-empty { padding: 10px 12px; color: var(--muted2); font-size: 12.5px; }
.ep-detail { min-height: 392px; max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--bg2); }
.ep-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ep-headpath { font-size: 12.5px; overflow-wrap: anywhere; }
.ep-sub { font-size: 12px; color: var(--muted); margin: 0 0 6px; overflow-wrap: anywhere; }
.ep-desc { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.ep-detail h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted2); margin: 14px 0 6px; }
.param-list { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.param-list li { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line); margin: 0; }
.p-in { font-size: 10.5px; color: var(--info); }
.p-req { font-size: 10.5px; color: var(--warn); }
.p-type { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.p-desc { flex: 1 1 100%; color: var(--muted2); font-size: 11.5px; }
.resp-row { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; background: var(--panel); }
.resp-code { font-family: var(--mono); font-size: 11.5px; color: var(--accent); margin-right: 6px; }
.resp-desc { font-size: 11.5px; color: var(--muted); }
.resp-schema { margin-top: 6px; }
.media-type { font-family: var(--mono); font-size: 11px; color: var(--muted2); margin: 0 0 3px; }
.tree { list-style: none; margin: 4px 0 0; padding-left: 12px; border-left: 1px dashed var(--line2); font-size: 11.5px; }
.tree li { margin: 2px 0; overflow-wrap: anywhere; }
.t-tree { margin: 0; }
.t-ty { font-family: var(--mono); font-size: 11px; color: var(--info); }
.t-ref { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.t-req { font-size: 10.5px; color: var(--warn); }
.t-circ { font-style: normal; color: var(--warn); font-family: var(--font); font-size: 10.5px; }
.t-items { font-size: 10.5px; color: var(--muted2); }

.m { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.m-get { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-dim); }
.m-post { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }
.m-put, .m-patch { color: var(--info); border-color: color-mix(in srgb, var(--info) 36%, transparent); background: var(--info-dim); }
.m-delete { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-dim); }

.code-out {
  margin: 0 0 10px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-family: var(--mono); font-size: 11.5px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere; height: 168px; overflow-y: auto; color: var(--ink);
}
.code-out.tall { height: 300px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin: 0 0 6px; font-size: 12px; color: var(--muted); min-height: 22px; }
.opt-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 8px; }
.opt-row .fld { min-width: 120px; }
#mockSeed { max-width: 150px; }
.struct-wrap { max-height: 420px; }
.type-table th[scope="row"] { width: 44%; color: var(--muted); font-weight: 600; background: transparent; }
.type-table td { font-family: var(--mono); font-size: 12px; }
.feat p, .step p, .why-item p, .guide-card span, .guide-card b, .chips li, .lede,
.feat h3, .why-item h3, .doc p, .doc li, .faq details p {
  word-break: keep-all;
  overflow-wrap: break-word;
}
.feats, .steps, .why-list, .guide-grid > * { min-width: 0; }
@media (max-width: 1040px) {
  .ep-grid { grid-template-columns: minmax(0, 1fr); }
  .ep-list-wrap, .ep-detail { height: auto; max-height: 320px; }
}
@media (max-width: 720px) {
  #specInput { min-height: 260px; }
  .diag-list { height: 340px; }
  .panel { min-height: 380px; }
  .code-out { height: 140px; }
  .code-out.tall { height: 240px; }
}

/* protobuflab additions */
.t-val { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.warn-list .warn-title { color: var(--warn); font-weight: 700; }
.byte-wrap { max-height: 220px; overflow: auto; }
.byte-wrap table { font-size: 11.5px; table-layout: fixed; width: 100%; }
.byte-wrap td, .byte-wrap th { padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.byte-wrap th:nth-child(1), .byte-wrap td:nth-child(1) { width: 54px; }
.byte-wrap th:nth-child(2), .byte-wrap td:nth-child(2) { width: 64px; }
.byte-wrap th:nth-child(3), .byte-wrap td:nth-child(3) { width: 52px; }
.byte-wrap th:nth-child(4), .byte-wrap td:nth-child(4) { width: 48px; }
.byte-wrap th:nth-child(5), .byte-wrap td:nth-child(5) { width: 48px; }
#decodeTree { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px 8px 8px; background: var(--bg2); }
#decodeWarn { margin-top: 8px; }
#panelDecode .panel-head { margin-top: 12px; }

/* layout stability: reserve space for dynamic diagnostics and pills */
.head-actions { min-width: 158px; justify-content: flex-end; }
#diagBadge, #breakBadge { min-width: 150px; text-align: center; }
#syntaxPill, #msgPill, #prevPill, #bytePill, #byteMapPill, #structPill { min-width: 56px; text-align: center; }
.diag-list { overflow-y: scroll; scrollbar-gutter: stable; }
#decodeTree { overflow-y: scroll; scrollbar-gutter: stable; }
.byte-wrap { overflow-y: scroll; scrollbar-gutter: stable; }
.struct-wrap { overflow-y: scroll; scrollbar-gutter: stable; }
.lab-status { min-height: 1.6em; }

/* fixed editor heights so dynamic values never resize the workbench */
#protoInput { height: 262px; }
#bytesInput { height: 104px; }
#prevInput { height: 118px; }
#jsonOut, #outReport, #outReportJson { height: 330px; }
#bytePill { width: 168px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#prevPill { width: 64px; }
#msgPill { width: 64px; }
#syntaxPill { width: 74px; }
#byteMapPill { width: 168px; }
#structPill { width: 64px; }
@media (max-width: 620px) {
  #protoInput { height: 220px; }
  #bytesInput { height: 92px; }
  #prevInput { height: 96px; }
  #jsonOut, #outReport, #outReportJson { height: 260px; }
  #bytePill, #byteMapPill { width: 46vw; }
  #prevPill, #msgPill, #structPill { width: 58px; }
  #syntaxPill { width: 68px; }
}

/* mobile: keep the status bar one line so the workbench never reflows on load */
@media (max-width: 620px) {
  .lab-bar { align-items: flex-start; }
  .lab-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}
