/* Shared UI kit for the Vine example apps — premium light product UI on Vine's
   real brand tokens: pale-mint canvas, forest-green accent, Inter + Fraunces. */

:root {
  --bg: #f4fbf5;
  --surface: #ffffff;
  --border: #e0ebe1;
  --border-soft: #eef5ef;
  --ink: #17251b;
  --ink-2: #526455;
  --ink-3: #8a9c8d;
  --green: #4f7a52;
  --green-dark: #3f6442;
  --green-deep: #2f5233;
  --green-wash: #eef5ef;
  --green-tint: #f7fbf7;
  --amber: #b4772f;
  --shadow-sm: 0 1px 2px rgba(23, 37, 27, 0.05);
  --shadow: 0 6px 28px -12px rgba(47, 82, 51, 0.22), 0 1px 3px rgba(23, 37, 27, 0.05);
  --shadow-lg: 0 28px 70px -28px rgba(47, 82, 51, 0.34), 0 2px 8px rgba(23, 37, 27, 0.05);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Inter", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.011em;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(680px 460px at 12% -6%, rgba(79, 122, 82, 0.12), transparent 62%),
    radial-gradient(720px 520px at 92% -2%, rgba(157, 192, 160, 0.18), transparent 60%);
}
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── header ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(20px, 6vw, 72px);
  background: rgba(244, 251, 245, 0.72);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.mascot { height: 32px; width: auto; }
.wordmark-text { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1; color: var(--green-deep); letter-spacing: -0.01em; }
.cross { color: var(--ink-3); font-size: 15px; margin: 0 3px; }
.partner-logo { height: 23px; width: auto; border-radius: 5px; }
.partner-name { font-size: 19px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }

/* ── hero ── */
main { padding: clamp(16px, 3vw, 32px) clamp(20px, 6vw, 72px) 120px; max-width: 960px; }

/* Embedded in the docs via <iframe>: no header/hero, tighter padding, transparent
   canvas so it sits flush inside the docs page. */
body.embed { background: transparent; min-height: 0; }
body.embed .topbar { position: static; }
body.embed main { padding: 20px clamp(14px, 3vw, 28px) 28px; }
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-wash);
  color: var(--green-dark);
  border: 1px solid #dcebde;
  border-radius: 999px;
  padding: 6px 15px 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 22px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(79, 122, 82, 0.15); }
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4.5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--green-deep);
  margin: 4px 0 14px;
  max-width: 18ch;
}
.hero-sub { font-size: 16.5px; line-height: 1.5; color: var(--ink-2); margin: 0 0 26px; max-width: 58ch; }
main > * { animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
main > *:nth-child(2) { animation-delay: 0.04s; }
main > *:nth-child(3) { animation-delay: 0.08s; }
main > *:nth-child(4) { animation-delay: 0.12s; }

/* ── search / input ── */
.searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 7px 7px 7px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.22s, border-color 0.22s;
}
.searchbar-block { flex-direction: column; align-items: stretch; padding: 16px; gap: 14px; }
.searchbar:focus-within { border-color: var(--green); box-shadow: var(--shadow-lg), 0 0 0 4px rgba(79, 122, 82, 0.1); }
.search-icon { color: var(--ink-3); flex: none; }
.searchbar input,
.searchbar textarea {
  flex: 1;
  width: 100%;
  border: 0;
  background: none;
  outline: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  padding: 14px 0;
  resize: none;
  line-height: 1.6;
}
.searchbar textarea { font-family: var(--mono); font-size: 14.5px; padding: 0; }
.searchbar textarea::placeholder,
.searchbar input::placeholder { color: var(--ink-3); }

.go {
  appearance: none;
  border: 0;
  background: var(--green);
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  padding: 0 20px;
  height: 48px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 16px -6px rgba(47, 82, 51, 0.6);
  transition: background 0.18s, transform 0.1s, box-shadow 0.18s;
}
.searchbar-block .go { align-self: flex-start; }
.go svg { transition: transform 0.18s; }
.go:hover { background: var(--green-dark); box-shadow: 0 10px 24px -8px rgba(47, 82, 51, 0.7); }
.go:hover svg { transform: translateX(3px); }
.go:active { transform: translateY(1px); }
.go[disabled] { opacity: 0.5; cursor: default; box-shadow: none; }

.chips { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip {
  appearance: none;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.16s;
}
.chip:hover { border-color: var(--green); color: var(--green-dark); background: #fff; box-shadow: var(--shadow-sm); }

/* ── research input panel ── */
.research-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.22s, border-color 0.22s;
}
.research-panel:focus-within {
  border-color: var(--green);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(79, 122, 82, 0.1);
}
.rp-head { display: flex; align-items: baseline; gap: 10px; padding: 15px 18px 2px; }
.rp-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.rp-hint { font-size: 12px; color: var(--ink-3); }
.rp-input {
  border: 0;
  background: none;
  outline: 0;
  resize: none;
  width: 100%;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14.5px;
  line-height: 2;
  padding: 8px 18px 12px;
}
.rp-input::placeholder { color: var(--ink-3); }
.rp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 12px 12px 18px;
  border-top: 1px solid var(--border-soft);
  background: var(--green-tint);
}
.rp-examples { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-ex-label { font-size: 12px; color: var(--ink-3); }
.rp-foot .chips { margin-top: 0; }
.rp-foot .chip { background: rgba(255, 255, 255, 0.75); }
.rp-foot .go { height: 42px; padding: 0 18px; }

/* ── status ── */
.status { font-size: 14px; color: var(--ink-3); min-height: 20px; margin: 14px 0 10px; display: flex; align-items: center; gap: 8px; }
.status:empty { margin: 0; min-height: 0; }
.spinner { width: 13px; height: 13px; border: 2px solid var(--green-wash); border-top-color: var(--green); border-radius: 50%; animation: spin 0.7s linear infinite; flex: none; }
.status.err { color: var(--amber); }

/* ── results table (scan / verify) ── */
.table { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.table.plain { border: 0; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.thead {
  display: grid;
  gap: 20px;
  padding: 14px 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(var(--green-tint), transparent);
}
.thead-scan { grid-template-columns: 1fr 1.7fr; }
.tbody { display: flex; flex-direction: column; }

.row { padding: 16px 22px; border-bottom: 1px solid var(--border-soft); animation: rowin 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.row:last-child { border-bottom: 0; }
.row-scan { display: grid; grid-template-columns: 1fr 1.7fr; gap: 20px; align-items: center; transition: background 0.15s; }
.row-scan:hover { background: var(--green-tint); }

.biz { display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 500; color: var(--ink); min-width: 0; }
.biz span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(79, 122, 82, 0.15); }
.dot.off { background: #cad7cc; }
.dot.wait { background: #9dc0a0; animation: pulse 0.9s ease-in-out infinite; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 450;
  color: var(--green-deep);
  background: var(--green-wash);
  border: 1px solid #dcebde;
  border-radius: 7px;
  padding: 4px 9px 4px 6px;
}
.pill-logo { width: 15px; height: 15px; border-radius: 4px; object-fit: contain; background: #fff; }
.pill.none { color: var(--ink-3); background: none; border: 1px dashed var(--border); padding: 4px 10px; }

/* ── research cards ── */
.row-research { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 22px 24px; margin-bottom: 14px; animation: rowin 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.rr-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.rr-fav { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--border-soft); }
.rr-name { font-size: 17px; font-weight: 600; color: var(--ink); }
.rr-domain { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.rr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; position: relative; }
.rr-grid::before { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1px; background: var(--border-soft); }
.rr-src { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); margin-bottom: 12px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.rr-src img { width: 14px; height: 14px; border-radius: 3px; }
.rr-src img.rr-src-vine { width: auto; height: 16px; border-radius: 0; }
.rr-line { font-size: 13.5px; color: var(--ink-2); margin: 6px 0; display: flex; gap: 10px; align-items: baseline; }
.rr-line b { color: var(--ink); font-weight: 500; }
.rr-k { color: var(--ink-3); min-width: 62px; flex: none; }

/* ── summary ── */
.summary { margin-top: 22px; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.summary:empty { display: none; margin: 0; }
.summary .live { display: inline-flex; align-items: center; gap: 7px; color: var(--green-dark); font-weight: 500; }
.summary .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(79, 122, 82, 0.18); }
.summary b { color: var(--green-deep); font-weight: 700; }
.summary .sep { color: var(--border); }

@keyframes rowin { from { opacity: 0; transform: translateY(9px) scale(0.995); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

@media (max-width: 720px) {
  .thead, .row-scan { grid-template-columns: 1fr; }
  .thead span:not(:first-child) { display: none; }
  .rr-grid { grid-template-columns: 1fr; gap: 16px; }
  .rr-grid::before { display: none; }
}

/* ── native example pages: "How it works" walkthrough ── */
.walkthrough { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--border-soft); max-width: 760px; }
.wt-lead { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0 0 22px; }
.wt-h2 { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--ink); margin: 30px 0 18px; }
.wt-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.wt-steps > li { position: relative; padding-left: 44px; counter-increment: step; }
.wt-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--green-deep); background: var(--green-wash); border: 1px solid #dcebde;
}
.wt-steps h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 3px 0 7px; }
.wt-steps p { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.wt-bullets { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.wt-bullets li { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.walkthrough code { font-family: var(--mono); font-size: 0.86em; background: var(--green-wash); border: 1px solid #e2eee3; border-radius: 5px; padding: 1px 5px; color: var(--green-deep); }
.wt-code { margin: 14px 0 0; padding: 16px 18px; background: #0f1a12; border-radius: 12px; overflow-x: auto; }
.wt-code code { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; background: none; border: 0; padding: 0; color: #cfe6d1; white-space: pre; }

/* ── native /examples app chrome: global top nav + Examples sidebar ──
   The nav bar spans full width (background + border) but its contents and the
   shell below share one centered max-width container — Mintlify's docs layout. */
:root { --ex-maxw: 1320px; --ex-gutter: clamp(20px, 4vw, 48px); }
.ex-topnav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 13px 0;
  background: rgba(244, 251, 245, 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.ex-topnav-inner {
  max-width: var(--ex-maxw);
  margin: 0 auto;
  padding: 0 var(--ex-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.ex-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.ex-logo .mascot { height: 30px; width: auto; }
.ex-logo .wordmark-text { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1; color: var(--green-deep); letter-spacing: -0.01em; }
.ex-nav { display: flex; align-items: center; gap: 24px; }
.ex-nav a { font-size: 14.5px; color: var(--ink-2); text-decoration: none; transition: color 0.15s; }
.ex-nav a:hover { color: var(--ink); }
.ex-nav a.active { color: var(--ink); font-weight: 600; }
.ex-nav-cta {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 15px;
  color: var(--green-dark) !important;
  font-weight: 600 !important;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ex-nav-cta:hover { border-color: var(--green); box-shadow: var(--shadow); }
.ex-nav-search { display: inline-flex; align-items: center; color: var(--ink-3) !important; }
.ex-nav-search:hover { color: var(--ink-2) !important; }

/* Shell shares the nav's centered container: sidebar aligns under the logo,
   content fills the rest, symmetric page margins on both sides. */
.ex-shell {
  display: flex;
  align-items: flex-start;
  max-width: var(--ex-maxw);
  margin: 0 auto;
  padding: 0 var(--ex-gutter);
}
.ex-sidebar {
  flex: none;
  width: 244px;
  padding: 46px 28px 46px 0;
  position: sticky;
  top: 58px;
  align-self: flex-start;
}
.ex-side-h { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 20px; letter-spacing: -0.01em; }
.ex-side-nav { display: flex; flex-direction: column; gap: 3px; }
.ex-side-nav a {
  position: relative;
  font-size: 14.5px;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.14s;
}
.ex-side-nav a:hover { color: var(--ink); }
.ex-side-nav a.active { color: var(--green-dark); font-weight: 600; }
.ex-side-nav a.active::before {
  content: "›";
  position: absolute;
  left: -17px;
  top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--green-dark);
}

.ex-content {
  flex: 1;
  min-width: 0;
  max-width: 860px;
  padding: 46px 0 120px 64px;
}
.ex-content > * { animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ex-content > *:nth-child(2) { animation-delay: 0.04s; }
.ex-content > *:nth-child(3) { animation-delay: 0.08s; }
.ex-content > *:nth-child(4) { animation-delay: 0.12s; }

/* compact Vine × partner co-brand inside the content (above the hero) */
.ex-cobrand { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.ex-cobrand .mascot { height: 36px; width: auto; }
.ex-cobrand .wordmark-text { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1; color: var(--green-deep); }
.ex-cobrand .cross { color: var(--ink-3); font-size: 16px; margin: 0 2px; }
.ex-cobrand .partner-logo { height: 25px; width: auto; border-radius: 5px; }
.ex-cobrand .partner-name { font-size: 21px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }

@media (max-width: 900px) {
  .ex-sidebar { display: none; }
  .ex-content { max-width: none; padding-left: 0; }
  .ex-nav { gap: 16px; }
  .ex-nav a:not(.ex-nav-cta):not(.ex-nav-search) { display: none; }
}

/* ── /examples index cards ── */
.ex-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
.ex-card {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-sm); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ex-card:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px); }
.ex-brand img { height: 26px; width: auto; }
.ex-card h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 4px 0 0; }
.ex-card p { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0; flex: 1; }
.ex-go { font-size: 13.5px; font-weight: 500; color: var(--green); margin-top: 4px; }
@media (max-width: 720px) { .ex-cards { grid-template-columns: 1fr; } }
