/* ──────────────────────────────────────────────────
   Blog — jayanthkatta.com/blog
   Design: dark nav + hero, clean white cards, orange accents
   ────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  --ink:       #0f1923;
  --ink-80:    #1e2d3d;
  --ink-60:    #2e4255;
  --orange:    #FF9900;
  --orange-dim:#cc7a00;
  --orange-bg: rgba(255,153,0,0.08);
  --text:      #1a1a2e;
  --text-muted:#5a6a7a;
  --border:    #e8edf2;
  --surface:   #f6f8fa;
  --card-bg:   #ffffff;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10);
  --font:      'DM Sans', system-ui, sans-serif;
  --mono:      'DM Mono', 'Cascadia Code', monospace;
  --nav-h:     60px;
}

/* ── DARK MODE ───────────────────────────────────── */
body.dark {
  --text:      #e6edf3;
  --text-muted:#8b9ab0;
  --border:    #2d3a4a;
  --surface:   #111c27;
  --card-bg:   #162230;
  --orange-bg: rgba(255,153,0,0.1);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.5);
}
body.dark { background: var(--surface); }
body.dark .post-card { background: var(--card-bg); border-color: var(--border); }
body.dark .sidebar-card { background: var(--card-bg); border-color: var(--border); }
body.dark .filters { background: var(--card-bg); border-color: var(--border); }
body.dark .filter-pill { border-color: var(--border); color: var(--text-muted); }
body.dark .filter-pill:hover { border-color: var(--orange); color: var(--orange); }
body.dark #blog-search { background: var(--surface) !important; border-color: var(--border) !important; color: var(--text) !important; }
body.dark .results-count { background: var(--surface); border-color: var(--border); }
body.dark .post-nav-link { background: var(--card-bg); border-color: var(--border); }
body.dark .post-body { color: var(--text); }
body.dark .post-body h1, body.dark .post-body h2,
body.dark .post-body h3, body.dark .post-body h4 { color: var(--text); }
body.dark .post-body :not(pre) > code { background: #1a2738; border-color: #2d3a4a; color: var(--orange); }
body.dark .post-body blockquote { background: rgba(255,153,0,0.08); color: #8b9ab0; }
body.dark .post-body table th { background: #111c27; }
body.dark .post-body table td, body.dark .post-body table th { border-color: var(--border); }
body.dark .post-body tr:hover td { background: #111c27; }
body.dark .post-header h1 { color: var(--text); }
body.dark .post-divider { border-color: var(--border); }
body.dark .post-tags { border-color: var(--border); }
body.dark .comments-section { border-color: var(--border); }
body.dark .comments-section h3 { color: var(--text); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ── NAV ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--ink);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .92rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: .01em;
}
.nav-logo svg { flex-shrink: 0; }

.nav-spacer { flex: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,.72);
  font-size: .875rem;
  font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--orange); }

.nav-icon-btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  color: rgba(255,255,255,.75);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
}
.nav-icon-btn:hover {
  background: rgba(255,153,0,.12);
  border-color: rgba(255,153,0,.4);
  color: var(--orange);
}
.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-size: 0.72rem;
  color: rgba(255,255,255,.75);
  display: flex; align-items: center; gap: 0.4rem;
  transition: all 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--orange); color: var(--orange); }


/* ── HERO ────────────────────────────────────────── */
.hero {
  background: var(--ink);
  color: #fff;
  padding: 3.5rem 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: .5;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .75rem;
}
.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .6rem;
  line-height: 1.2;
}
.hero-sub {
  color: rgba(255,255,255,.58);
  font-size: .95rem;
  max-width: 480px;
  margin: 0 auto 1.75rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-n {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}
.hero-stat-l {
  display: block;
  font-size: .7rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: .25rem;
}

/* ── SEARCH BAR (below nav, toggled by icon) ────── */
.search-bar-wrap {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height .2s ease, padding .2s ease;
}
.search-bar-wrap.open {
  max-height: 64px;
  padding: .65rem 2rem;
}
.search-bar-wrap input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .5rem .85rem;
  font-size: .88rem;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.search-bar-wrap input:focus { border-color: var(--orange); }
.search-bar-wrap input::placeholder { color: var(--text-muted); }

/* ── FILTER BAR ─────────────────────────────────── */
.filters {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: .85rem 2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
}
.filter-pill {
  padding: .3rem .85rem;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  font-family: var(--font);
}
.filter-pill:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.filter-pill.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

/* ── LAYOUT ─────────────────────────────────────── */
.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

/* ── POST GRID ──────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255,153,0,.3);
}

.post-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .7rem;
  flex-wrap: wrap;
}

.tag-badge {
  display: inline-block;
  padding: .18rem .55rem;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--orange-bg);
  color: var(--orange-dim);
}

.post-date {
  font-size: .72rem;
  color: var(--text-muted);
  margin-left: auto;
}

.post-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: .6rem;
  transition: color .15s;
}
.post-card:hover .post-title { color: var(--orange); }

.post-excerpt {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

.read-time {
  font-size: .72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.read-more {
  font-size: .78rem;
  font-weight: 600;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: .25rem;
  transition: gap .15s;
}
.post-card:hover .read-more { gap: .45rem; }

/* Empty state */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state h3 { margin-bottom: .5rem; color: var(--text); }

/* ── SIDEBAR ─────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.sidebar-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.sidebar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.sb-stat { text-align: center; }
.sb-stat-n {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}
.sb-stat-l {
  display: block;
  font-size: .67rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.sb-tag {
  font-size: .73rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
}
.sb-tag:hover, .sb-tag.active {
  background: var(--orange-bg);
  color: var(--orange);
  border-color: rgba(255,153,0,.3);
}

.ask-cta {
  background: linear-gradient(135deg, var(--ink), var(--ink-80));
  border-color: rgba(255,153,0,.2) !important;
  text-align: center;
}
.ask-cta-icon { font-size: 1.75rem; margin-bottom: .6rem; }
.ask-cta-title {
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .35rem;
}
.ask-cta-sub {
  font-size: .76rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.ask-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--orange);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 700;
  padding: .45rem 1rem;
  border-radius: 20px;
  transition: opacity .15s;
}
.ask-cta-btn:hover { opacity: .85; }

/* ── POST PAGE ──────────────────────────────────── */
.post-page-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}
.post-breadcrumb a { transition: color .15s; }
.post-breadcrumb a:hover { color: var(--orange); }
.post-breadcrumb-sep { color: var(--border); }

.post-header { margin-bottom: 2.5rem; }

.post-header-meta {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .9rem;
  flex-wrap: wrap;
}

.post-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: .75rem;
}

.post-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.post-info-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.post-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 2.5rem;
}

/* ── POST CONTENT ────────────────────────────────── */
.post-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
  margin: 2rem 0 .75rem;
  color: var(--text);
}
.post-body h2 { font-size: 1.4rem; }
.post-body h3 { font-size: 1.15rem; }
.post-body h4 { font-size: 1rem; color: var(--text-muted); }

.post-body p { margin-bottom: 1.35rem; }

.post-body ul,
.post-body ol {
  margin: 0 0 1.35rem 1.5rem;
}
.post-body li { margin-bottom: .4rem; }

.post-body a {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-color: rgba(255,153,0,.3);
  transition: text-decoration-color .15s;
}
.post-body a:hover { text-decoration-color: var(--orange); }

.post-body blockquote {
  margin: 1.5rem 0;
  padding: .85rem 1.25rem;
  border-left: 3px solid var(--orange);
  background: var(--orange-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-60);
  font-style: italic;
}

.post-body pre {
  background: #1a1f2e;
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgba(255,255,255,.06);
  position: relative;
}
.post-body code {
  font-family: var(--mono);
  font-size: .84em;
}
.post-body pre code {
  background: none;
  padding: 0;
  color: #abb2bf;
  font-size: .82rem;
  line-height: 1.7;
}
.post-body :not(pre) > code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1em .35em;
  font-size: .85em;
  color: var(--orange-dim);
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .875rem;
}
.post-body th,
.post-body td {
  padding: .6rem .85rem;
  border: 1px solid var(--border);
  text-align: left;
}
.post-body th {
  background: var(--surface);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}
.post-body tr:hover td { background: var(--surface); }

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.post-body img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin: 1rem 0;
}

/* ── POST FOOTER ─────────────────────────────────── */
.post-tags {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.post-tags-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.post-nav-link {
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: border-color .15s, box-shadow .15s;
}
.post-nav-link:hover {
  border-color: rgba(255,153,0,.4);
  box-shadow: var(--shadow-md);
}
.post-nav-link.prev { text-align: left; }
.post-nav-link.next { text-align: right; }
.post-nav-dir {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: .25rem;
}
.post-nav-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* ── COMMENTS ────────────────────────────────────── */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.comments-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* ── BACK TO TOP ─────────────────────────────────── */
.back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--orange);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  box-shadow: var(--shadow-md);
  font-size: 1rem;
  z-index: 200;
}
.back-top.show { opacity: 1; transform: translateY(0); }

/* ── FOOTER ─────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.45);
  text-align: center;
  padding: 1.75rem 2rem;
  font-size: .78rem;
}
.footer a { color: var(--orange); }

/* ── SEARCH HIGHLIGHT ────────────────────────────── */
mark {
  background: rgba(255,153,0,.2);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { padding: 0 1rem; gap: 1rem; }
  .nav-links { display: none; }
  .nav-search input { width: 140px; }
  .nav-search input:focus { width: 160px; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .filters { padding: .7rem 1rem; top: var(--nav-h); }
  .layout { padding: 1.5rem 1rem; }
  .post-page-layout { padding: 1.5rem 1rem 3rem; }
  .post-nav { grid-template-columns: 1fr; }
  .back-top { bottom: 1.25rem; right: 1.25rem; }
}

/* ── FEEDBACK WIDGET ────────────────────────────── */
.fb-btn {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 900;
  width: 36px; height: 80px; border-radius: 8px 0 0 8px;
  background: #0f1923; color: #FF9900;
  border: 1.5px solid rgba(255,153,0,0.5); border-right: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 20px; transition: border-color .2s, width .2s;
}
.fb-btn:hover { border-color: #FF9900; width: 42px; }
@media (max-width: 640px) { .fb-btn { width: 30px; height: 64px; font-size: 16px; } }
.fb-overlay {
  display: none; position: fixed; inset: 0; z-index: 901;
  background: rgba(0,0,0,0.55); align-items: flex-end; justify-content: flex-start; padding: 1.75rem;
}
.fb-overlay.open { display: flex; }
.fb-modal { background: #162230; border: 1px solid rgba(255,153,0,0.25); border-radius: 16px; padding: 1.5rem; width: 300px; }
.fb-title { color: #e0e0e0; font-size: 15px; font-weight: 600; margin-bottom: .35rem; }
.fb-sub { color: #879196; font-size: 12px; margin-bottom: 1.25rem; }
.fb-stars { display: flex; gap: 8px; margin-bottom: .5rem; }
.fb-star { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid rgba(255,153,0,0.3); background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #546E7A; font-size: 18px; transition: all .15s; }
.fb-star.on { border-color: #FF9900; color: #FF9900; background: rgba(255,153,0,0.1); }
.fb-labels { display: flex; justify-content: space-between; font-size: 11px; color: #546E7A; margin-bottom: 1rem; }
.fb-textarea { width: 100%; background: #0f1923; border: 1px solid rgba(255,153,0,0.2); border-radius: 8px; color: #e0e0e0; font-size: 13px; padding: .6rem .75rem; resize: none; height: 68px; margin-bottom: 1rem; font-family: inherit; box-sizing: border-box; }
.fb-textarea::placeholder { color: #546E7A; }
.fb-textarea:focus { outline: none; border-color: rgba(255,153,0,0.5); }
.fb-footer { display: flex; justify-content: space-between; align-items: center; }
.fb-skip { background: transparent; border: none; color: #546E7A; font-size: 13px; cursor: pointer; }
.fb-send { background: #FF9900; color: #0f1923; border: none; border-radius: 8px; padding: .45rem 1.1rem; font-size: 13px; font-weight: 700; cursor: pointer; }
.fb-send:hover { background: #e68900; }
.fb-thanks { text-align: center; padding: 1rem 0; color: #e0e0e0; font-size: 14px; }

/* ── ASK WIDGET ─────────────────────────────────── */
@keyframes ask-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,153,0,0.25), 0 4px 20px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 0 0 7px rgba(255,153,0,0.06), 0 4px 20px rgba(0,0,0,0.5); }
}
.ask-launcher {
  position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 900;
  width: 52px; height: 52px; border-radius: 50%;
  background: #0f1923; color: #FF9900;
  border: 1.5px solid rgba(255,153,0,0.5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  animation: ask-pulse 3s ease-in-out infinite;
  transition: border-color 0.2s, transform 0.15s;
}
.ask-launcher:hover {
  border-color: #FF9900; transform: scale(1.12); animation: none;
  box-shadow: 0 0 0 8px rgba(255,153,0,0.12), 0 4px 28px rgba(255,153,0,0.25);
}
.ask-overlay {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.ask-overlay.open { opacity: 1; pointer-events: all; }
.ask-terminal {
  width: 100%; max-width: 640px; background: #0f1923;
  border: 1px solid #2d3a4a; border-radius: 10px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  transform: translateY(16px) scale(0.98); transition: transform 0.2s ease;
  max-height: 90vh; display: flex; flex-direction: column;
}
.ask-overlay.open .ask-terminal { transform: translateY(0) scale(1); }
.ask-titlebar {
  display: flex; align-items: center; gap: .5rem;
  padding: .75rem 1rem; background: #1a2738; border-bottom: 1px solid #2d3a4a; flex-shrink: 0;
}
.ask-dot { width: 12px; height: 12px; border-radius: 50%; }
.ask-dot-red    { background: #ff5f57; }
.ask-dot-yellow { background: #febc2e; }
.ask-dot-green  { background: #28c840; }
.ask-titlebar-label {
  flex: 1; text-align: center; font-family: var(--mono);
  font-size: .72rem; color: #5a7a9a; letter-spacing: .04em;
}
.ask-close {
  background: transparent; border: 0; cursor: pointer;
  color: #5a7a9a; font-size: 1rem; line-height: 1; padding: 0; transition: color .15s;
}
.ask-close:hover { color: #e6edf3; }
.ask-body { padding: 1.25rem 1.25rem 0; flex-shrink: 0; }
.ask-prompt-row { display: flex; align-items: flex-start; gap: .5rem; margin-bottom: 1rem; }
.ask-prompt-label { font-family: var(--mono); font-size: .8rem; color: #FF9900; white-space: nowrap; padding-top: .15rem; flex-shrink: 0; }
.ask-input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: #e6edf3; font-family: var(--mono); font-size: .8rem;
  line-height: 1.5; resize: none; padding: 0; min-width: 0; caret-color: #FF9900;
}
.ask-input::placeholder { color: #3d5570; }
.ask-send-row { display: flex; justify-content: flex-end; padding-bottom: 1rem; border-bottom: 1px solid #1a2738; }
.ask-send-btn {
  background: #FF9900; color: #0f1923; border: 0; border-radius: 4px; cursor: pointer;
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .4rem 1rem; transition: background .15s, opacity .15s;
}
.ask-send-btn:hover { background: #e88600; }
.ask-send-btn:disabled { opacity: .35; cursor: not-allowed; }
.ask-output { padding: 1rem 1.25rem 1.25rem; overflow-y: auto; max-height: 340px; flex: 1; display: none; }
.ask-output.visible { display: block; }
.ask-output-label { font-family: var(--mono); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #FF9900; margin-bottom: .6rem; }
.ask-answer { font-size: .85rem; color: #c9d1d9; line-height: 1.8; white-space: pre-wrap; margin-bottom: 1rem; }
.ask-answer code { font-family: var(--mono); font-size: .78rem; background: #1a2738; color: #FF9900; border: 1px solid #2d3a4a; border-radius: 3px; padding: .05em .4em; }
.ask-sources-label { font-family: var(--mono); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #5a7a9a; margin-bottom: .5rem; margin-top: .75rem; }
.ask-sources a { display: flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: .75rem; color: #4db8ff; text-decoration: none; margin-bottom: .3rem; transition: color .15s; }
.ask-sources a::before { content: '└'; color: #3d5570; }
.ask-sources a:hover { color: #FF9900; }
.ask-spinner { font-family: var(--mono); font-size: .8rem; color: #5a7a9a; padding: .5rem 0; }
.ask-error { font-family: var(--mono); font-size: .8rem; color: #e57373; }

/* ── NO-RESULTS counter ─────────────────────────── */
.results-count {
  font-size: .78rem;
  color: var(--text-muted);
  padding: .5rem 0 .5rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
