/* Vikiio Search 2.0 */
:root {
  --bg: #ffffff; --bg-soft: #fbfbfe; --surface: #ffffff; --surface-2: #f7f7fb; --surface-3: #efeff7;
  --ai-surface: #f2f8ff; --ai-surface-2: #e6f2ff; --ai-border: #cfe4ff;
  --text: #171a2b; --muted: #646b7c; --faint: #8c91a1; --border: #e7e8f0; --border-strong: #d6d8e3;
  --accent: #167eff; --accent-2: #06baff; --accent-text: #0b5fd6; --accent-solid: #0b62db; --grad: linear-gradient(135deg, #167eff, #06baff);
  --link: #1a4bd1; --visited: #6a35b8; --url: #3c4152;
  --warn-bg: #fff7e0; --warn-text: #5f4500; --warn-border: #f1dc9a;
  --err-bg: #fdecec; --err-text: #8a1f1f;
  --shadow-sm: 0 1px 2px rgb(23 26 43 / 5%);
  --shadow: 0 1px 2px rgb(23 26 43 / 4%), 0 6px 20px rgb(23 26 43 / 6%);
  --shadow-lg: 0 2px 6px rgb(23 26 43 / 6%), 0 18px 40px rgb(23 26 43 / 10%);
  --ring: 0 0 0 3px rgb(22 126 255 / 24%);
  --r-sm: 10px; --r: 14px; --r-lg: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f16; --bg-soft: #11121a; --surface: #171822; --surface-2: #1d1f2b; --surface-3: #262838;
    --ai-surface: #0f1a2b; --ai-surface-2: #13223a; --ai-border: #1e3556;
    --text: #ecedf4; --muted: #a6aabb; --faint: #7d8195; --border: #2a2c3b; --border-strong: #383b4e;
    --accent: #4aa3ff; --accent-2: #3fd0ff; --accent-text: #7dbbff; --accent-solid: #1c74e8;
    --link: #8eb8ff; --visited: #c8adff; --url: #b6bacb;
    --warn-bg: #33290d; --warn-text: #f3dc92; --warn-border: #574816;
    --err-bg: #3a1a1d; --err-text: #ffb4b4;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 30%); --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
    --shadow-lg: 0 2px 6px rgb(0 0 0 / 35%), 0 18px 40px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0f16; --bg-soft: #11121a; --surface: #171822; --surface-2: #1d1f2b; --surface-3: #262838;
  --ai-surface: #0f1a2b; --ai-surface-2: #13223a; --ai-border: #1e3556;
  --text: #ecedf4; --muted: #a6aabb; --faint: #7d8195; --border: #2a2c3b; --border-strong: #383b4e;
  --accent: #4aa3ff; --accent-2: #3fd0ff; --accent-text: #7dbbff; --accent-solid: #1c74e8;
  --link: #8eb8ff; --visited: #c8adff; --url: #b6bacb;
  --warn-bg: #33290d; --warn-text: #f3dc92; --warn-border: #574816;
  --err-bg: #3a1a1d; --err-text: #ffb4b4;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 30%); --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 35%), 0 18px 40px rgb(0 0 0 / 40%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; }

/* ---------- buttons ---------- */
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 0; background: transparent; color: var(--muted); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.btn:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); text-decoration: none; }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--accent-solid); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.soft { background: var(--surface); border-color: var(--ai-border); color: var(--accent-text); }
.btn.soft:hover { background: var(--ai-surface-2); }
.btn.ask { height: 44px; padding: 0 18px; border-color: var(--ai-border); background: var(--surface); color: var(--accent-text); font-weight: 600; }
.btn.ask svg { color: var(--accent); }
.btn.ask:hover { background: var(--ai-surface); }

/* ---------- search box ---------- */
.searchbox { position: relative; width: 100%; }
.searchbox form {
  display: flex; align-items: center; gap: 4px; height: 52px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 0 6px 0 22px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.searchbox form:hover { box-shadow: var(--shadow); }
.searchbox form:focus-within { border-color: var(--accent); box-shadow: var(--shadow), var(--ring); }
.searchbox.open form { border-radius: 26px 26px 0 0; border-bottom-color: transparent; }
.searchbox input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 100%; font-size: 17px; }
.searchbox input[type="search"]::-webkit-search-cancel-button { display: none; }
.submit-btn { width: 44px; height: 40px; border-radius: 999px; background: var(--accent-solid); color: #fff; }
.submit-btn:hover { background: var(--accent-solid); color: #fff; filter: brightness(1.08); }
.searchbox.loading .submit-btn svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.suggestions {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 60; margin: 0; padding: 6px 0 10px; list-style: none;
  background: var(--surface); border: 1px solid var(--accent); border-top: 1px solid var(--border);
  border-radius: 0 0 26px 26px; box-shadow: var(--shadow-lg), var(--ring);
}
.suggestions li { display: flex; align-items: center; gap: 14px; padding: 9px 22px; cursor: pointer; transition: background .12s; }
.suggestions li svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--surface-2); }
.suggestions mark { background: none; color: inherit; font-weight: 650; }

/* ---------- home ---------- */
.home { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: radial-gradient(1200px 500px at 50% -10%, var(--ai-surface), transparent 70%), var(--bg); }
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 4px; padding: 12px 16px; }
.home main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 16px 14vh; }
.brand { display: flex; align-items: center; gap: 16px; margin: 0 0 30px; font: inherit; }
.brand .logo-img { height: 64px; width: auto; }
.brand .word { font-size: 40px; font-weight: 720; letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-top: 6px; }
/* Light/dark logo files follow the same theme rules as the colour tokens. */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.home-box { width: 100%; display: flex; justify-content: center; }
.home .searchbox { max-width: 660px; }
.home .searchbox form { height: 56px; }
.home .hint { margin-top: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.hint code, .notice code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
footer.site { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 16px; color: var(--faint); font-size: 12.5px; }
footer.site a { color: var(--muted); }
.banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); font-size: 13.5px;
}
.banner strong { font-weight: 650; }
.home .banner { max-width: 660px; margin-top: 22px; }

/* ---------- results header ---------- */
.results-page header.bar {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.5) blur(12px); border-bottom: 1px solid var(--border);
}
.bar-inner { display: flex; align-items: center; gap: 18px; max-width: 1320px; margin: 0 auto; padding: 14px 24px 6px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.logo:hover { text-decoration: none; }
.logo .logo-img { height: 34px; width: auto; }
.logo .wm { font-size: 13px; font-weight: 650; color: var(--accent-text); padding: 2px 8px; border-radius: 999px; background: var(--ai-surface); border: 1px solid var(--ai-border); }
.bar-box { flex: 1; min-width: 0; max-width: 690px; display: flex; }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-row { display: flex; align-items: center; gap: 12px; max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px 13px;
  color: var(--muted); white-space: nowrap; font-size: 14px; font-weight: 500; transition: color .15s;
}
.tabs a svg { width: 17px; height: 17px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); transform: scaleX(0); transition: transform .18s var(--ease); }
.tabs a[aria-current="page"] { color: var(--accent-text); font-weight: 650; }
.tabs a[aria-current="page"]::after { transform: scaleX(1); }
.tools-wrap { position: relative; flex: none; }
.tools-btn { height: 36px; }
.tools-btn[aria-expanded="true"] { background: var(--surface-2); }
.popover {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: 300px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg);
  animation: pop .14s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.popover label { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.popover select {
  appearance: none; height: 38px; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0 34px 0 12px; background: var(--surface-2); font-size: 14px; color: var(--text); font-weight: 400;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.popover .switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; padding-top: 4px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 12px; }
.switch { position: relative; width: 40px; height: 24px; border-radius: 999px; border: 0; background: var(--border-strong); transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s var(--ease); }
.switch[aria-checked="true"] { background: var(--accent-solid); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.popover .ops { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.6; }
.loadbar { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--accent); opacity: 0; }
.loadbar.on { opacity: 1; animation: load 1.2s var(--ease) infinite; }
@keyframes load { 0% { width: 0; margin-left: 0; } 60% { width: 50%; margin-left: 25%; } 100% { width: 0; margin-left: 100%; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 1320px; margin: 0 auto; padding: 12px 24px 0; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--ai-surface); border: 1px solid var(--ai-border); color: var(--accent-text); font-size: 13px; font-weight: 500; }
.chip button { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 0; background: transparent; color: inherit; }
.chip button:hover { background: var(--ai-surface-2); }
.chip svg { width: 14px; height: 14px; }

/* ---------- page layout ---------- */
.page { max-width: 1320px; margin: 0 auto; padding: 18px 24px 64px; }
/* Left-aligned like the header, so a side module arriving later never moves the results. */
.layout { display: grid; grid-template-columns: minmax(0, 740px) minmax(0, 340px); gap: 48px; justify-content: start; align-items: start; }
.layout.single { grid-template-columns: minmax(0, 760px); }
.layout.images { grid-template-columns: minmax(0, 1fr); }
.main-col { min-width: 0; transition: opacity .15s; }
.side-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; position: sticky; top: 130px; }
.page.busy .main-col, .page.busy .side-col { opacity: .55; pointer-events: none; }
.meta-line { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.meta-line a { font-weight: 600; }
.notice { margin: 0 0 16px; }
.notice.err { background: var(--err-bg); color: var(--err-text); border-color: transparent; }
.notice ul { margin: 0; padding-left: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }
.section-title svg { width: 20px; height: 20px; color: var(--accent); }

/* ---------- organic results ---------- */
.results { display: grid; }
.result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 16px 0 18px; border-bottom: 1px solid var(--border); }
.result:last-child { border-bottom: 0; }
.r-site { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; min-width: 0; }
.fav {
  width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; flex: none; overflow: hidden; font-size: 12px; font-weight: 700; color: var(--muted);
}
.fav img { width: 18px; height: 18px; }
.r-site .names { min-width: 0; line-height: 1.3; flex: 1; }
.r-site .site-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-site .crumb { font-size: 12.5px; color: var(--url); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-site .crumb span { color: var(--faint); }
.more-btn { width: 30px; height: 30px; margin-left: 4px; opacity: .7; }
.result:hover .more-btn, .more-btn[aria-expanded="true"] { opacity: 1; }
.result h3 { margin: 0 0 4px; font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -0.005em; }
.result h3 a { transition: color .12s; }
.result h3 a:visited { color: var(--visited); }
.snip { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.snip b { color: var(--text); font-weight: 600; }
.snip .age { color: var(--faint); }
.r-thumb { width: 152px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--surface-2); align-self: center; border: 1px solid var(--border); }
.r-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s var(--ease); }
.r-thumb:hover img { transform: scale(1.04); }
.menu {
  position: absolute; z-index: 40; min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow-lg); animation: pop .12s var(--ease);
}
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; font-size: 14px; color: var(--text); text-align: left; }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--surface-2); text-decoration: none; }
.menu svg { width: 17px; height: 17px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: pop .15s var(--ease); }

/* ---------- people also ask ---------- */
.paa { margin: 22px 0 8px; padding: 18px 20px 8px; }
.paa details { border-top: 1px solid var(--border); }
.paa details:first-of-type { border-top: 0; }
.paa summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 500; }
.paa summary::-webkit-details-marker { display: none; }
.paa summary svg { width: 18px; height: 18px; color: var(--muted); transition: transform .18s var(--ease); flex: none; }
.paa details[open] summary svg { transform: rotate(180deg); }
.paa .ans { padding: 0 2px 14px; font-size: 14.5px; color: var(--muted); }
.paa .ans p { margin: 0 0 10px; color: var(--text); }
.paa .src { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.paa .src .fav { width: 22px; height: 22px; border-radius: 6px; }
.paa .src .fav img { width: 14px; height: 14px; }
.paa .src .btn { height: 30px; padding: 0 12px; font-size: 13px; margin-left: auto; }

/* ---------- knowledge panel ---------- */
.kp { overflow: hidden; }
.kp-hero { position: relative; height: 172px; background: var(--surface-2); }
.kp-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kp-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgb(10 10 25 / 72%)); }
.kp-hero .kp-head { position: absolute; left: 20px; right: 20px; bottom: 14px; z-index: 1; color: #fff; }
.kp-head h2 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; }
.kp-head p { margin: 4px 0 0; font-size: 14.5px; opacity: .92; }
.kp-hero .kp-head p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kp > .kp-head { padding: 18px 20px 0; }
.kp > .kp-head p { color: var(--muted); }
.kp-body { padding: 14px 20px 6px; }
.kp-body > p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.55; }
.kp dl { margin: 0; display: grid; }
.kp dl div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.kp dt { font-weight: 600; }
.kp dd { margin: 0; color: var(--muted); }
.kp-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px 12px 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--faint); }
.kp-foot a { color: var(--muted); }
.kp-foot .icon-btn { margin-left: auto; width: 32px; height: 32px; }
.kp.collapsed .kp-body { display: none; }
.kp.collapsed .kp-foot svg { transform: rotate(180deg); }

/* ---------- explore / related ---------- */
.explore { padding: 18px 18px 18px; }
.explore-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.topic {
  display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: var(--r); text-align: left;
  border: 1px solid var(--ai-border); background: var(--ai-surface); transition: transform .15s var(--ease), box-shadow .15s, background .15s;
}
.topic:hover { transform: translateY(-1px); box-shadow: var(--shadow); background: var(--ai-surface-2); }
.topic svg { width: 22px; height: 22px; color: var(--accent); margin-bottom: 4px; }
.topic b { font-size: 14.5px; }
.topic span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.main-col .explore { margin: 0 0 20px; }
.related { padding: 18px; }
.related ul { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; list-style: none; margin: 0; padding: 0; }
.related a {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--ai-border); color: var(--text); font-size: 13.5px; transition: background .12s;
}
.related a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related a:hover { background: var(--ai-surface); text-decoration: none; }
.related svg { width: 15px; height: 15px; color: var(--accent); flex: none; }

/* ---------- pager / attribution / empty ---------- */
.pager { display: flex; gap: 6px; align-items: center; margin: 28px 0 0; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 40px; height: 40px; padding: 0 14px; display: inline-grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; transition: border-color .12s;
}
.pager a:hover { text-decoration: none; border-color: var(--border-strong); }
.pager [aria-current="page"] { background: var(--accent-solid); color: #fff; border-color: transparent; }
.attribution { margin-top: 26px; font-size: 12.5px; color: var(--faint); }
.attribution a { color: var(--muted); }
.empty { padding: 36px 0; color: var(--muted); max-width: 560px; }
.empty h2 { color: var(--text); font-size: 20px; margin: 0 0 6px; }
.empty .actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.skeleton .line { height: 12px; border-radius: 6px; background: var(--surface-2); margin: 10px 0; animation: pulse 1.2s ease-in-out infinite; }
.skeleton .line.t { height: 18px; width: 70%; }
.skeleton .line.s { width: 40%; }
@keyframes pulse { 50% { opacity: .5; } }

/* ---------- Vikiio Answer ---------- */
.answer {
  position: relative; margin: 0 0 22px; padding: 20px 22px 18px; border-radius: var(--r-lg);
  background: radial-gradient(600px 220px at 100% 0%, var(--ai-surface-2), transparent 70%), var(--ai-surface);
  border: 1px solid var(--ai-border); box-shadow: var(--shadow); min-height: 150px;
}
.answer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.answer-head .spark { color: var(--accent); display: inline-grid; }
.answer-head .spark svg { width: 22px; height: 22px; }
.answer-head .name { font-size: 17px; font-weight: 700; }
.pill { font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--surface); border: 1px solid var(--ai-border); border-radius: 999px; padding: 2px 10px; }
.answer-head .spacer { flex: 1; }
.answer-head .icon-btn { width: 34px; height: 34px; }
.answer h2.aq { margin: 6px 0 10px; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.turn + .turn { border-top: 1px solid var(--ai-border); margin-top: 16px; padding-top: 14px; }
.turn .q { font-weight: 650; font-size: 16px; margin: 0 0 6px; }
.answer-body { font-size: 15.5px; line-height: 1.65; }
.answer-body p { margin: 0 0 10px; }
.answer-body ul, .answer-body ol { margin: 0 0 10px; padding-left: 20px; }
.answer-body li { margin: 3px 0; }
.answer-body.clamped { max-height: 15.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.answer-body.streaming > :last-child::after { content: ""; display: inline-block; width: 7px; height: 15px; margin-left: 3px; vertical-align: -2px; background: var(--accent); border-radius: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.muted { color: var(--muted); }
.cite {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin: 0 1px; vertical-align: 2px;
  border-radius: 6px; background: var(--surface); border: 1px solid var(--ai-border); color: var(--accent-text); font-size: 11px; font-weight: 700; line-height: 1;
  transition: background .12s, color .12s;
}
.cite:hover { background: var(--accent-solid); color: #fff; text-decoration: none; border-color: transparent; }
.more-link { border: 0; background: none; color: var(--accent-text); font-weight: 600; padding: 4px 0; font-size: 14px; }
.answer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.evidence { margin-top: 14px; display: grid; gap: 8px; }
.evidence a.ev { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--ai-border); color: var(--text); }
.evidence a.ev:hover { text-decoration: none; border-color: var(--accent); }
.evidence .n { grid-row: span 2; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--ai-surface-2); color: var(--accent-text); font-size: 12px; font-weight: 700; }
.evidence .t { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence q { font-size: 13.5px; color: var(--muted); quotes: "“" "”"; }
.followups { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.followups button { border: 1px solid var(--ai-border); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; text-align: left; transition: border-color .12s; }
.followups button:hover { border-color: var(--accent); }
.ask-more { display: flex; gap: 6px; margin-top: 12px; }
.ask-more input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--ai-border); border-radius: 999px; padding: 0 16px; background: var(--surface); outline: none; }
.ask-more input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.ask-more button { border: 0; background: var(--accent-solid); color: #fff; border-radius: 999px; padding: 0 18px; font-weight: 600; }
.ask-more button:disabled { opacity: .5; cursor: default; }
.answer .disclaimer { margin: 12px 0 0; font-size: 12px; color: var(--faint); }
.answer .err-text { color: var(--err-text); }

/* ---------- images ---------- */
.filters-note { font-size: 12.5px; color: var(--faint); margin: 0 0 14px; }
.images-layout { display: flex; gap: 20px; align-items: flex-start; }
.grid { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.grid::after { content: ""; flex-grow: 999; }
.tile { position: relative; border: 0; padding: 0; background: var(--surface-2); border-radius: 12px; overflow: hidden; height: 200px; transition: box-shadow .15s, transform .15s var(--ease); }
.tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile .cap { position: absolute; inset: auto 0 0 0; padding: 22px 10px 8px; font-size: 12px; color: #fff; text-align: left; background: linear-gradient(transparent, rgb(0 0 0 / 65%)); opacity: 0; transition: opacity .15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; }
.tile[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.preview { position: sticky; top: 130px; width: 400px; flex: none; padding: 16px; }
.preview .pv-img { display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; min-height: 180px; max-height: 440px; overflow: hidden; }
.preview .pv-img img { max-width: 100%; max-height: 440px; display: block; }
.preview h3 { font-size: 17px; margin: 14px 0 4px; }
.preview .pv-meta { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.preview .pv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.preview .pv-note { font-size: 12px; color: var(--faint); margin: 14px 0 0; }
.preview .close { position: absolute; top: 8px; right: 8px; z-index: 1; background: var(--surface); }

/* ---------- videos / news ---------- */
.media { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.media .thumb { width: 196px; height: 110px; border-radius: 12px; overflow: hidden; background: var(--surface-2); position: relative; display: block; }
.media .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s var(--ease); }
.media .thumb:hover img { transform: scale(1.04); }
.media .dur { position: absolute; right: 6px; bottom: 6px; background: rgb(0 0 0 / 78%); color: #fff; font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; }
.media h3 { margin: 0 0 4px; font-size: 18px; font-weight: 500; line-height: 1.3; }
.media p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.media .by { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: #d33a3a; padding: 1px 6px; border-radius: 5px; margin-right: 6px; vertical-align: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side-col { position: static; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
  .bar-inner .btn.ask span { display: none; }
  .bar-inner .btn.ask { padding: 0 13px; }
}
@media (max-width: 900px) {
  .preview { position: fixed; inset: auto 0 0 0; width: auto; top: auto; max-height: 78vh; overflow: auto; border-radius: 20px 20px 0 0; z-index: 80; }
}
@media (max-width: 680px) {
  .bar-inner { flex-wrap: wrap; gap: 10px; padding: 10px 14px 4px; }
  .logo .wm { display: none; }
  .logo .logo-img { height: 28px; }
  .bar-box { order: 3; flex-basis: 100%; max-width: none; }
  .searchbox form { height: 48px; padding-left: 18px; }
  .nav-row, .chips { padding-left: 14px; padding-right: 14px; }
  .tabs a { padding: 10px 10px 12px; }
  .tabs a svg { display: none; }
  .tools-btn span { display: none; }
  .page { padding: 12px 16px 48px; }
  .result { grid-template-columns: minmax(0, 1fr); }
  .r-thumb { display: none; }
  .result h3 { font-size: 18px; }
  .answer { padding: 16px; }
  .answer h2.aq { font-size: 22px; }
  .explore-grid, .related ul { grid-template-columns: minmax(0, 1fr); }
  .media .thumb { width: 128px; height: 72px; }
  .tile { height: 132px; }
  .brand .logo-img { height: 46px; }
  .brand .word { font-size: 28px; }
  .kp dl div { grid-template-columns: 96px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
}
