/* ============================================================
   Venice Video Models Wiki — styles
   ============================================================ */

:root {
  --bg: #0a0b0d;
  --bg-elev: #111318;
  --bg-elev-2: #171a20;
  --bg-code: #060708;
  --border: #20242c;
  --border-strong: #2c313b;
  --text: #f3f4f6;
  --text-dim: #aab1bd;
  --text-faint: #6b7280;
  --accent: #3d7bff;
  --accent-hover: #2f6bf0;
  --accent-soft: rgba(61, 123, 255, 0.14);
  --accent-2: #5b8cff;
  --green: #4ade80;
  --yellow: #fbbf24;
  --red: #f87171;
  --blue: #5b8cff;
  --sidebar-w: 270px;
  --toc-w: 220px;
  --header-h: 61px;
  --maxw: 860px;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-elev: #f7f8fa;
  --bg-elev-2: #eef0f4;
  --bg-code: #f4f5f7;
  --border: #e6e8ec;
  --border-strong: #d2d7df;
  --text: #0d1117;
  --text-dim: #4b525e;
  --text-faint: #8a909c;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --accent-2: #2563eb;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.header-main { display: flex; align-items: center; gap: 18px; height: 60px; padding: 0 22px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 26px; width: auto; display: block; }
[data-theme="light"] .brand-logo { filter: invert(1); }
.brand-sub { color: var(--text-faint); font-weight: 500; font-size: 12.5px; border-left: 1px solid var(--border); padding-left: 12px; }

.header-search { flex: 1; max-width: 460px; margin: 0 auto; position: relative; }
.header-search input {
  width: 100%; height: 38px; padding: 0 46px 0 34px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-size: 14px; font-family: var(--sans);
}
.header-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.header-search .si { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.header-search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 11px; color: var(--text-faint);
  background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; pointer-events: none;
}
.try-venice { background: var(--accent); color: #fff; padding: 8px 15px; border-radius: 8px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.try-venice:hover { background: var(--accent-hover); text-decoration: none; }
.search-results {
  position: absolute; top: 46px; left: 0; right: 0;
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.4); overflow: hidden; display: none; max-height: 60vh; overflow-y: auto;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 9px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.search-results a:hover, .search-results a.active { background: var(--accent-soft); text-decoration: none; }
.search-results .sr-title { font-weight: 600; font-size: 14px; }
.search-results .sr-crumb { font-size: 12px; color: var(--text-faint); }
.search-results .sr-empty { padding: 14px; color: var(--text-faint); font-size: 14px; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text-dim); cursor: pointer;
  display: grid; place-items: center; font-size: 16px;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.menu-toggle { display: none; }

/* ---------- Layout ---------- */
.layout { display: flex; padding-top: var(--header-h); }

.sidebar {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w);
  overflow-y: auto; padding: 20px 14px 60px; border-right: 1px solid var(--border);
  background: var(--bg);
}
.nav-group { margin-bottom: 22px; }
.nav-group h4 {
  margin: 0 0 8px; padding: 0 10px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-faint); font-weight: 700;
}
.nav-group a {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px;
  color: var(--text-dim); font-size: 14.5px; line-height: 1.3;
}
.nav-group a:hover { background: var(--bg-elev); color: var(--text); text-decoration: none; }
.nav-group a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-group a .em { font-size: 15px; }
.nav-tag { margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 999px; font-weight: 700; letter-spacing: .02em; }
.tag-nsfw { background: rgba(248,113,113,.16); color: var(--red); }
.tag-open { background: rgba(96,165,250,.16); color: var(--blue); }

.content-wrap { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; justify-content: center; }
.content { width: 100%; max-width: var(--maxw); padding: 36px 40px 120px; min-width: 0; }
.content.wide { max-width: 1120px; }

.toc {
  position: sticky; top: calc(var(--header-h) + 20px); align-self: flex-start;
  width: var(--toc-w); flex: none; padding: 20px 18px; margin-top: 20px;
  max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto;
}
.toc h5 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); }
.toc a { display: block; padding: 4px 0 4px 12px; color: var(--text-faint); font-size: 13px; border-left: 2px solid var(--border); line-height: 1.4; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }
.toc a.lvl-3 { padding-left: 24px; }

/* ---------- Content typography ---------- */
.content h1 { font-size: 40px; line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 12px; font-weight: 700; }
.content h2 { font-size: 24px; letter-spacing: -0.01em; margin: 44px 0 14px; padding-top: 8px; }
.content h3 { font-size: 18.5px; margin: 30px 0 10px; }
.content h4 { font-size: 15px; margin: 22px 0 8px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); }
.content p { margin: 0 0 14px; color: var(--text); }
.content ul, .content ol { margin: 0 0 16px; padding-left: 22px; }
.content li { margin: 5px 0; }
.content li::marker { color: var(--accent); }
.content strong { color: var(--text); font-weight: 700; }
.content hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }

.lead { font-size: 19px; line-height: 1.6; color: var(--text-dim); margin: 0 0 26px; max-width: 70ch; }
.breadcrumb { display: none; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 17px; border-radius: 8px; font-size: 14.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary { background: var(--bg-elev); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text-faint); text-decoration: none; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 34px; }

/* inline code */
.content code {
  font-family: var(--mono); font-size: 0.86em; background: var(--bg-elev-2);
  padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border);
}
.content pre {
  background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; overflow-x: auto; margin: 0 0 18px; position: relative;
}
.content pre code { background: none; border: none; padding: 0; font-size: 13.5px; line-height: 1.6; color: var(--text); white-space: pre; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; font-size: 11px; padding: 4px 8px; border-radius: 6px;
  background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; opacity: 0;
  transition: opacity .15s;
}
.content pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--text); }

/* prompt block */
.prompt {
  background: var(--bg-code); border: 1px solid var(--border-strong); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 14px 16px; margin: 0 0 18px; font-family: var(--mono);
  font-size: 13.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; position: relative;
}
.prompt-label { display: block; font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 8px; font-weight: 700; }

/* callouts */
.callout { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 14px 44px; margin: 0 0 18px; position: relative; background: var(--bg-elev); }
.callout::before { position: absolute; left: 14px; top: 13px; font-size: 17px; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; margin-bottom: 4px; }
.callout.info { border-color: rgba(96,165,250,.35); } .callout.info::before { content: "ℹ️"; }
.callout.tip { border-color: rgba(74,222,128,.35); } .callout.tip::before { content: "💡"; }
.callout.warn { border-color: rgba(251,191,36,.4); } .callout.warn::before { content: "⚠️"; }
.callout.danger { border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.06); } .callout.danger::before { content: "🛑"; }
.callout.consent { border-color: rgba(255,90,77,.5); background: var(--accent-soft); } .callout.consent::before { content: "✅"; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-elev); font-weight: 700; color: var(--text); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td .yes { color: var(--green); font-weight: 700; }
td .no { color: var(--red); font-weight: 700; }
td .partial { color: var(--yellow); font-weight: 700; }

/* badges / pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-dim); background: var(--bg-elev); margin: 0 6px 6px 0; }
.pill.green { color: var(--green); border-color: rgba(74,222,128,.4); }
.pill.red { color: var(--red); border-color: rgba(248,113,113,.4); }
.pill.yellow { color: var(--yellow); border-color: rgba(251,191,36,.4); }
.pill.blue { color: var(--blue); border-color: rgba(96,165,250,.4); }

/* spec grid */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 24px; }
.spec { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.spec .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-bottom: 3px; }
.spec .v { font-size: 15px; font-weight: 600; color: var(--text); }

/* model cards (home) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 8px 0 28px; }
.card {
  display: block; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; color: var(--text); transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.card .ct { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card .ce { font-size: 24px; }
.card h3 { margin: 0; font-size: 17px; }
.card p { font-size: 14px; color: var(--text-dim); margin: 0 0 12px; }
.card .best { font-size: 12px; color: var(--text-faint); }
.card .best b { color: var(--accent); }

/* use-case row */
.uc { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.uc:last-child { border-bottom: none; }
.uc .mode { font-weight: 700; color: var(--accent); font-size: 14px; }
.uc .mode small { display: block; color: var(--text-faint); font-weight: 400; font-size: 12px; }

/* video embeds */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-single { margin: 0 0 10px; }
.vcaption { font-size: 13.5px; color: var(--text-dim); margin: 0 0 22px; }
.vcaption a { color: var(--text-dim); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 6px 0 28px; }
.vcard { margin: 0; }
.vcard figcaption { font-size: 14.5px; color: var(--text); margin-top: 10px; font-weight: 600; line-height: 1.35; }
.vcard .vmeta { font-size: 12.5px; color: var(--text-faint); font-weight: 400; margin-top: 3px; }

/* footer */
.page-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--border); }
.page-nav a { display: block; padding: 14px 18px; border: 1px solid var(--border); border-radius: 10px; flex: 1; color: var(--text); }
.page-nav a:hover { border-color: var(--accent); text-decoration: none; }
.page-nav .lbl { font-size: 12px; color: var(--text-faint); }
.page-nav .ttl { font-weight: 600; }
.page-nav .next { text-align: right; }
.site-foot { color: var(--text-faint); font-size: 13px; margin-top: 40px; }

.scrim { display: none; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,.5); z-index: 40; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .toc { display: none; } }
@media (max-width: 860px) {
  .menu-toggle { display: grid; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; z-index: 45; box-shadow: 6px 0 30px rgba(0,0,0,.4); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .scrim { display: block; }
  .content-wrap { margin-left: 0; }
  .content { padding: 26px 20px 100px; }
  .brand-sub { display: none; }
  .header-main { gap: 12px; padding: 0 14px; }
  .header-search { max-width: none; }
}
