/*
Copyright (C) 2023-2026 QuantumNous

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

For commercial licensing, please contact support@quantumnous.com
*/

/* Unified documentation design system: every bundled docs page shares one
   layout (sticky top bar, left navigation, single content column). */

:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #68738a;
  --line: #e3e7ee;
  --line-soft: #eef1f6;
  --accent: #2463eb;
  --accent-soft: #edf4ff;
  --accent-strong: #164aaf;
  --green: #087443;
  --green-soft: #ecfdf3;
  --amber: #9a6700;
  --amber-soft: #fff8df;
  --red: #a53a3a;
  --code: #101827;
  --code-ink: #dfe8f7;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --header-h: 64px;
  --sidebar-w: 262px;
  --radius: 6px;
  /* Legacy aliases keep in-page inline styles working. */
  --purple: var(--accent);
  --text: var(--ink);
  --text-soft: var(--muted);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--mono); }
code {
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #f0f3f8;
  color: #33476d;
  font-size: 0.91em;
}

/* Shell ------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}
.brand, .top-links, .top-actions { display: flex; align-items: center; }
.brand { gap: 0.7rem; font-size: 0.96rem; font-weight: 760; white-space: nowrap; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand span + span { color: var(--muted); font-weight: 600; }
.top-links { gap: 0.2rem; }
.top-links a {
  padding: 0.48rem 0.7rem;
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}
.top-links a:hover { color: var(--ink); background: #f2f5f9; }
.top-links a.is-active { color: var(--accent-strong); background: var(--accent-soft); }
.top-actions a {
  padding: 0.48rem 0.74rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}
.top-actions a:hover { border-color: var(--accent); background: var(--accent-soft); }
.mobile-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  width: min(1440px, 100%);
  min-height: calc(100vh - var(--header-h));
  margin: 0 auto;
}
.sidebar {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 1.35rem 1rem 2.5rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  scrollbar-width: thin;
}
.side-title {
  margin: 0.15rem 0 0.45rem 0.7rem;
  color: #929bad;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}
.side-title:not(:first-child) { margin-top: 1.35rem; }
.side-nav { display: grid; gap: 0.12rem; }
.side-nav a, .side-nav button {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  width: 100%;
  padding: 0.46rem 0.7rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #526078;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 620;
  text-align: left;
  cursor: pointer;
}
.side-nav a:hover, .side-nav button:hover { color: var(--accent-strong); background: #f3f7ff; }
.side-nav a.is-active, .side-nav button.is-active { color: var(--accent-strong); background: var(--accent-soft); }
.side-nav .dot { width: 0.38rem; height: 0.38rem; border-radius: 50%; background: #b4becf; flex: none; }
.side-nav a.is-active .dot, .side-nav button.is-active .dot { background: var(--accent); }
.side-nav .mark {
  width: 1.15rem;
  color: #8ea0bc;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  flex: none;
}
.side-nav a.is-active .mark, .side-nav button.is-active .mark { color: var(--accent); }
.side-subtitle {
  margin: 0.6rem 0 0.15rem 0.72rem;
  color: #a0aabc;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#tool-toc {
  display: grid;
  gap: 0.02rem;
  max-height: 16rem;
  margin-left: 0.72rem;
  padding-left: 0.6rem;
  border-left: 1px solid #dce5f3;
  overflow-y: auto;
}
#tool-toc a {
  display: block;
  padding: 0.24rem 0.4rem;
  border-radius: 4px;
  color: #8a96aa;
  font-size: 0.75rem;
  font-weight: 560;
  line-height: 1.45;
}
#tool-toc a:hover { color: var(--accent-strong); background: #f0f5ff; }
.side-note {
  margin: 1.35rem 0.55rem 0;
  padding: 0.8rem;
  border: 1px solid #d9e6fb;
  border-radius: var(--radius);
  background: #f5f9ff;
  color: #5e7191;
  font-size: 0.78rem;
  line-height: 1.6;
}
.side-note a { color: var(--accent); font-weight: 700; }

main {
  min-width: 0;
  padding: 3rem clamp(1.4rem, 5vw, 5rem) 5rem;
  background: var(--panel);
}
.content { max-width: 900px; }
section { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.content > section + section { margin-top: 4.5rem; }
.eyebrow {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
h1, h2, h3 { letter-spacing: 0; line-height: 1.25; color: var(--ink); }
h1 { margin: 0.65rem 0 1rem; font-size: clamp(2.05rem, 4.4vw, 3rem); font-weight: 800; }
h2 { margin: 0 0 0.8rem; font-size: 1.5rem; font-weight: 780; }
h3 { margin: 1.85rem 0 0.7rem; font-size: 1.06rem; font-weight: 760; }
p { margin: 0.65rem 0; color: #536176; }
.intro { max-width: 780px; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.35rem; }
.hero-actions a {
  display: inline-flex;
  align-items: center;
  padding: 0.58rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #40516e;
  font-size: 0.88rem;
  font-weight: 700;
}
.hero-actions a:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.hero-actions a.primary { border-color: var(--accent); background: var(--accent); color: white; }
.hero-actions a.primary:hover { background: var(--accent-strong); color: white; }

/* Shared primitives ------------------------------------------------------- */

.callout, .note-banner, .note-box, .warn-box {
  margin: 1.35rem 0;
  padding: 0.95rem 1rem;
  border: 1px solid #d7e5fb;
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  background: #f7faff;
  color: #465b7e;
  font-size: 0.92rem;
}
.callout strong, .note-banner strong, .note-box strong, .warn-box strong { color: #24487f; }
.callout.warn, .warn-box {
  border-color: #f3dfa8;
  border-left-color: #e6a500;
  background: var(--amber-soft);
  color: #735a1e;
}
.callout.warn strong, .warn-box strong { color: var(--amber); }
.callout.success {
  border-color: #bee9d1;
  border-left-color: #20a464;
  background: var(--green-soft);
  color: #356a50;
}
.callout.success strong { color: var(--green); }
.note-banner a, .note-box a, .callout a { color: var(--accent); font-weight: 700; }

.inline-code {
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #f0f3f8;
  color: #33476d;
  font-family: var(--mono);
  font-size: 0.86em;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  margin: 1.2rem 0 0.95rem;
  font-family: var(--mono);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}
.method {
  display: inline-flex;
  align-items: center;
  min-width: 48px;
  justify-content: center;
  padding: 0.18rem 0.36rem;
  border-radius: 4px;
  background: #e9f8ef;
  color: #18794e;
  font-size: 0.75rem;
  font-weight: 800;
}
.method.get { background: #edf4ff; color: #2463eb; }
.endpoint-path { color: #25334c; font-weight: 650; }

.api-table, .cmd-table, .compare-table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.api-table th, .api-table td, .cmd-table th, .cmd-table td, .compare-table th, .compare-table td {
  padding: 0.78rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.api-table th, .cmd-table th, .compare-table th {
  background: #f7f9fc;
  color: #46536a;
  font-size: 0.79rem;
  font-weight: 800;
}
.api-table td, .cmd-table td, .compare-table td { color: #59677c; }
.api-table td:first-child {
  width: 22%;
  color: #263a5f;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 650;
}
.api-table td:nth-child(2) { width: 16%; color: #78849a; font-family: var(--mono); font-size: 0.78rem; }
.cmd-table td:first-child, .compare-table td:first-child {
  color: #263a5f;
  font-family: var(--mono);
  font-size: 0.83rem;
  font-weight: 650;
}

.mini-grid, .feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.15rem;
}
.mini-card, .feature-box, .info-box {
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}
.mini-card strong, .feature-box h3, .info-box h3 {
  display: block;
  margin: 0 0 0.35rem;
  color: #32405a;
  font-size: 0.9rem;
  font-weight: 760;
}
.mini-card span, .feature-box p, .info-box p { margin: 0; color: #6c7a92; font-size: 0.85rem; }
.divider { height: 1px; margin: 1.9rem 0; background: var(--line); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfe;
  color: #6c7a92;
  font-size: 0.78rem;
}

.code-block, .doc-code, .code-card {
  overflow: hidden;
  margin: 1rem 0 1.35rem;
  border: 1px solid #202d42;
  border-radius: 7px;
  background: var(--code);
  box-shadow: 0 7px 18px rgba(18, 31, 54, 0.11);
}
.code-head, .code-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 42px;
  padding: 0.5rem 0.7rem 0.5rem 0.9rem;
  border-bottom: 1px solid #26364f;
  color: #9facbf;
  font-family: var(--mono);
  font-size: 0.76rem;
}
.code-tabs { display: flex; align-items: center; gap: 0.35rem; }
.code-tab {
  padding: 0.24rem 0.44rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #9facbf;
  font: inherit;
  cursor: pointer;
}
.code-tab.is-active, .code-tab:hover { background: #233654; color: white; }
.copy, .copy-btn {
  padding: 0.25rem 0.44rem;
  border: 1px solid #3d506f;
  border-radius: 4px;
  background: transparent;
  color: #c8d6eb;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}
.copy:hover, .copy-btn:hover { background: #1d2c43; color: white; }
.code-dots { display: none; }
.code-title { flex: 1; min-width: 0; overflow: hidden; color: #9facbf; text-overflow: ellipsis; }
.code-panel { display: none; }
.code-panel.is-active { display: block; }
.code-body { overflow-x: auto; }
.code-block pre, .doc-code pre, .code-card pre {
  margin: 0;
  padding: 1rem 1.1rem 1.2rem;
  overflow-x: auto;
  color: var(--code-ink);
  font-size: 0.82rem;
  line-height: 1.72;
  white-space: pre;
}
.code-body .comment, .code-block .comment, .doc-code .comment { color: #6f8bb0; }
.code-body .key, .code-block .key, .doc-code .key { color: #8fd3ff; }
.code-body .string, .code-block .string, .doc-code .string { color: #9ce8b8; }
.code-body .plain, .code-block .plain, .doc-code .plain { color: #dfe8f7; }

.footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: #8490a3;
  font-size: 0.8rem;
}
.footer a { color: var(--accent); font-weight: 700; }

/* Quick start panels ------------------------------------------------------ */

.quick-shell { margin-top: 0.5rem; }
.quick-panel { display: none; }
.quick-panel.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}
.quick-copy, .glass-card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}
.quick-label {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.quick-title { margin: 0.5rem 0 0.55rem; font-size: 1.3rem; font-weight: 780; line-height: 1.35; }
.quick-desc { margin: 0 0 1.1rem; color: #536176; font-size: 0.92rem; }
.step-list { display: grid; gap: 0.85rem; }
.step-item {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: 0.2rem 0.7rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--line);
}
.step-item:last-child { padding-bottom: 0; border-bottom: 0; }
.step-num {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
}
.step-item h3 { margin: 0; font-size: 0.94rem; }
.step-item p { margin: 0.15rem 0 0; color: #6c7a92; font-size: 0.85rem; }
.step-item code, .note-banner code { padding: 0.1rem 0.3rem; font-size: 0.82em; }
.quick-panel .code-card { margin: 0; }
.quick-panel .code-body { max-height: 26rem; overflow: auto; }

/* Tutorials --------------------------------------------------------------- */

.doc-shell { margin-top: 0.5rem; }
.doc-article { display: none; max-width: 820px; }
.doc-article.is-active { display: block; }
.article-title { margin: 0 0 0.6rem; font-size: clamp(1.75rem, 3.4vw, 2.2rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-bottom: 1rem; color: #8490a3; font-size: 0.8rem; }
.article-lead { margin: 0 0 1.4rem; color: #5b6a82; font-size: 1rem; }
.doc-article h2 {
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  font-size: 1.32rem;
}
.doc-article h3 { margin-top: 1.5rem; }
.doc-article p { color: #536176; }
.doc-article ul, .doc-article ol { margin: 0.7rem 0 1rem; padding-left: 1.25rem; color: #536176; }
.doc-article li { margin: 0.4rem 0; }
.doc-article a { color: var(--accent); font-weight: 700; }
.doc-article .feature-grid, .doc-article .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Model reference --------------------------------------------------------- */

.meta-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.notice, .toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1.4rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
  color: #5e7191;
  font-size: 0.88rem;
}
.notice.is-error { border-color: #edc4c4; background: #fff8f8; color: var(--red); }
.toolbar input {
  flex: 1 1 15rem;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
}
.status { color: #8490a3; font-size: 0.8rem; }
.model-grid, .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-top: 1.2rem; }
.model-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}
.model-card h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.model-card p { margin: 0.3rem 0; font-size: 0.85rem; color: #6c7a92; }

@media (max-width: 1100px) {
  .quick-panel.is-active { grid-template-columns: minmax(0, 1fr); }
  .mini-grid, .feature-grid, .model-grid, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 900px) {
  .layout { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--header-h);
    z-index: 30;
    display: block;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 10px 0 30px rgba(25, 43, 76, 0.12);
    background: white;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .mobile-menu { display: inline-flex; }
  main { padding: 2.2rem 1.15rem 4rem; }
  .topbar { padding: 0 1rem; }
  .top-links { display: none; }
}

@media (max-width: 680px) {
  .brand span + span { display: none; }
  .mini-grid, .feature-grid, .doc-article .feature-grid, .doc-article .mini-grid, .model-grid, .grid { grid-template-columns: 1fr; }
  .api-table, .api-table tbody, .api-table tr, .api-table td { display: block; width: 100%; }
  .api-table thead { display: none; }
  .api-table { margin-top: 0.8rem; }
  .api-table tr { margin-bottom: 0.7rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .api-table td {
    display: grid;
    grid-template-columns: 7.2rem minmax(0, 1fr);
    gap: 0.6rem;
    min-width: 0;
    padding: 0.58rem 0.7rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .api-table td:last-child { border-bottom: 0; }
  .api-table td::before {
    content: attr(data-label);
    color: #8691a4;
    font-size: 0.76rem;
    font-weight: 700;
  }
  .code-block pre, .doc-code pre, .code-card pre { overflow-wrap: anywhere; white-space: pre-wrap; }
}

/* Model reference cards --------------------------------------------------- */

.model-nav { display: grid; gap: 0.08rem; max-height: calc(100vh - 320px); overflow-y: auto; }
.model-nav-group {
  margin: 0.55rem 0.7rem 0.18rem;
  color: #929bad;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}
.model-nav-group:first-child { margin-top: 0; }
.model-nav a {
  padding: 0.33rem 0.55rem 0.33rem 0.7rem;
  border-radius: 4px;
  color: #69768d;
  font-size: 0.77rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-nav a:hover { color: var(--accent-strong); background: var(--accent-soft); }
.model-nav a.is-active { color: var(--accent-strong); background: var(--accent-soft); font-weight: 700; }
.toolbar { position: sticky; top: calc(var(--header-h) + 1rem); z-index: 10; background: rgba(255, 255, 255, 0.92); box-shadow: 0 10px 26px rgba(30, 47, 79, 0.06); }
.toolbar input:focus { outline: 2px solid #b8d0ff; border-color: var(--accent); }
.notice.is-ok { border-color: #cce2d4; background: var(--green-soft); color: var(--green); }
.model-grid { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1040px; gap: 1.15rem; margin-top: 1.2rem; }
.card {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(30, 47, 79, 0.045);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:target { border-color: #9dbbfa; box-shadow: 0 12px 34px rgba(36, 99, 235, 0.16); }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid #eef1f5;
  background: linear-gradient(180deg, #fff, #fbfcff);
}
.card-title { min-width: 0; }
.breadcrumb { margin-bottom: 0.42rem; color: #8b95a6; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; }
.model-name { margin: 0; font-family: var(--mono); font-size: 1.2rem; font-weight: 760; overflow-wrap: anywhere; }
.model-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.55rem; }
.model-meta code { font-size: 0.72rem; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border: 1px solid #d9e3f7;
  border-radius: 999px;
  background: #f5f8ff;
  color: #58709b;
  font-size: 0.7rem;
  font-weight: 700;
}
.price-block { flex: none; min-width: 150px; padding: 0.55rem 0.7rem; border: 1px solid #d9eadf; border-radius: 9px; background: #f5fcf7; text-align: right; }
.price-label { margin-bottom: 0.18rem; color: #6f8d78; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; }
.price { color: var(--green); font-size: 0.82rem; font-weight: 760; }
.price small { display: block; color: var(--muted); font-weight: 500; }
.card-body { padding: 1rem 1.15rem 1.2rem; }
.intro-panel { padding: 0.8rem 0.9rem; border: 1px solid #e7ecf4; border-radius: 8px; background: #fbfcfe; }
.price-note { color: #68738a; font-size: 0.78rem; }
.card .section { margin-top: 1rem; }
.card .section-title { margin-bottom: 0.38rem; color: #7b879b; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.warning { padding: 0.65rem 0.75rem; border-radius: 7px; background: var(--amber-soft); color: var(--amber); font-size: 0.82rem; }
.warning + .warning { margin-top: 0.35rem; }
.card table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.card th, .card td { padding: 0.46rem 0.35rem; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: top; }
.card th { color: #7b879b; font-size: 0.72rem; font-weight: 750; }
.card td:first-child { width: 34%; font-family: var(--mono); color: #33476d; overflow-wrap: anywhere; }
.card .endpoint { display: flex; align-items: center; gap: 0.55rem; margin: 0.35rem 0; font-size: 0.8rem; }
.card .method { min-width: 3.6rem; padding: 0.18rem 0.35rem; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-family: var(--mono); font-size: 0.7rem; font-weight: 800; text-align: center; }
.path { font-family: var(--mono); overflow-wrap: anywhere; }
.card pre { margin: 0.45rem 0 0; padding: 0.8rem; border-radius: 7px; background: var(--code); color: var(--code-ink); font-size: 0.72rem; line-height: 1.55; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { padding: 2rem; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; }
.card .intro { color: #49566e; font-size: 0.9rem; margin: 0; }

/* Seedance 2.5 live price matrix */
.seedance-price-table { table-layout: fixed; }
.seedance-price-table th:first-child, .seedance-price-table td:first-child { width: 52%; font-family: inherit; }
.seedance-price-table th:nth-child(2), .seedance-price-table td:nth-child(2) { width: 48%; font-family: inherit; color: inherit; }
.seedance-price-table p { margin: 0.55rem 0 0; color: #59677c; line-height: 1.65; }
.seedance-model-head a { color: var(--accent-strong); text-decoration: none; }
.seedance-model-head a:hover { text-decoration: underline; }
.seedance-model-head code { font-size: 0.82rem; }
.seedance-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.65rem; }
.seedance-price-table .price-tiers { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.seedance-price-table .price-tier {
  display: inline-flex;
  flex-direction: column;
  min-width: 5.4rem;
  padding: 0.48rem 0.62rem;
  border: 1px solid #d9eadf;
  border-radius: 8px;
  background: #f5fcf7;
}
.seedance-price-table .tier-label { color: #6f8d78; font-size: 0.68rem; font-weight: 800; }
.seedance-price-table .price-tier strong { color: var(--green); font-size: 0.86rem; }
.seedance-price-table .tier-unit { color: var(--muted); font-size: 0.68rem; }
.seedance-price-table small { display: block; margin-top: 0.6rem; color: var(--muted); line-height: 1.55; }

@media (max-width: 720px) {
  .seedance-price-table { table-layout: auto; }
  .seedance-price-table td:first-child,
  .seedance-price-table td:nth-child(2) { width: 100%; }
}
