/* =========================================================
   MSP Tools Hub — styles.css
   Brand: Salesbuildr Design System v1.0
   ========================================================= */

:root {
  /* Backgrounds */
  --bg:           #FAFAF7;
  --bg-panel:     #FFFFFF;
  --bg-row:       #F5F5F2;

  /* Brand */
  --accent:       #2E74DC;
  --accent-2:     #1E5BB8;
  --accent-bg:    rgba(46, 116, 220, 0.06);
  --accent-border:rgba(46, 116, 220, 0.25);

  /* Text */
  --text:         #0B0E14;
  --text-2:       #4B5563;
  --text-3:       #9CA3AF;

  /* Borders */
  --border:       rgba(11, 14, 20, 0.09);
  --border-2:     rgba(11, 14, 20, 0.15);

  /* Semantic */
  --good:         #166534;
  --good-bg:      #DCFCE7;
  --warn:         #92400E;
  --warn-bg:      #FEF3C7;
  --danger:       #991B1B;
  --danger-bg:    #FEE2E2;
  --info:         #1E40AF;
  --info-bg:      #DBEAFE;

  --max-w: 1200px;
}

/* =========================================================
   Reset & base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Source Sans Pro', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

p, .body-text, .description {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-2);
  height: 52px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
  text-decoration: none;
}
.brand:hover { color: var(--text); opacity: 0.85; }

.brand-mark {
  width: 28px; height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  opacity: 0.85;
  color: white;
  flex-shrink: 0;
}
.brand-mark svg { width: 15px; height: 15px; fill: currentColor; }
.brand-mark.small { width: 22px; height: 22px; border-radius: 4px; }
.brand-mark.small svg { width: 12px; height: 12px; }

.brand-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.header-sub {
  margin: 0;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* =========================================================
   Search bar
   ========================================================= */
.search-bar-wrap {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.search-wrap {
  position: relative;
  max-width: 520px;
}

.search-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  width: 16px; height: 16px;
  pointer-events: none;
}
.search-icon svg { width: 100%; height: 100%; }

#search {
  width: 100%;
  padding: 8px 36px 8px 36px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 0;
  transition: border-color .15s, outline .15s;
}
#search:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
#search::placeholder { color: var(--text-3); }

.search-clear {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  width: 18px; height: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.search-clear svg { width: 13px; height: 13px; }
.search-clear:hover { color: var(--text); }

/* =========================================================
   Tabs
   ========================================================= */
.tabs-wrap {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-2);
  position: sticky;
  top: 52px;
  z-index: 20;
}

.tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px 11px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 1px 5px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  background: var(--bg-row);
  color: var(--text-3);
  border: 1px solid var(--border-2);
  transition: background .15s, color .15s, border-color .15s;
}
.tab-btn.active .tab-count {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent-border);
}

/* =========================================================
   Tools section
   ========================================================= */
.tools-section {
  padding: 20px 0 60px;
}

.section-head {
  margin-bottom: 14px;
}

.result-count {
  margin: 0;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.no-results {
  padding: 48px 0;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}

/* =========================================================
   Tool card
   ========================================================= */
.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .15s ease, background .15s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.tool-card:hover {
  border-color: var(--border-2);
  background: var(--bg-panel);
  color: inherit;
}
.tool-card:hover .card-foot {
  background: var(--bg-row);
}
.tool-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Card body */
.card-body {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

/* Icon square — aligned to brand accent tints */
.card-icon {
  width: 34px; height: 34px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border-2);
}
.card-icon svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Icon colour variants — soft tints of each brand colour */
.icon-navy    { background: rgba(15,31,61,0.07);    color: #0f1f3d; }
.icon-blue    { background: var(--accent-bg);        color: var(--accent); }
.icon-emerald { background: rgba(6,95,70,0.08);      color: #065f46; }
.icon-sunset  { background: rgba(190,24,93,0.08);    color: #be185d; }
.icon-teal    { background: rgba(15,118,110,0.08);   color: #0f766e; }
.icon-slate   { background: rgba(71,85,105,0.08);    color: #475569; }
.icon-rose    { background: rgba(159,18,57,0.08);    color: #9f1239; }
.icon-amber   { background: rgba(146,64,14,0.08);    color: #92400e; }
.icon-indigo  { background: rgba(49,46,129,0.08);    color: #312e81; }
.icon-violet  { background: rgba(91,33,182,0.08);    color: #5b21b6; }
.icon-cyan    { background: rgba(22,78,99,0.08);     color: #164e63; }
.icon-forest  { background: rgba(20,83,45,0.08);     color: #14532d; }
.icon-purple  { background: rgba(76,29,149,0.08);    color: #4c1d95; }
.icon-crimson { background: rgba(127,29,29,0.08);    color: #7f1d1d; }
.icon-coral   { background: rgba(124,45,18,0.08);    color: #c2410c; }
.icon-mint    { background: rgba(5,150,105,0.08);    color: #059669; }
.icon-lime    { background: rgba(22,163,74,0.08);    color: #16a34a; }
.icon-ruby    { background: rgba(225,29,72,0.08);    color: #e11d48; }
.icon-ocean   { background: rgba(3,105,161,0.08);    color: #0369a1; }
.icon-pine    { background: rgba(21,128,61,0.08);     color: #15803d; }
.icon-dusk    { background: rgba(109,40,217,0.08);    color: #6d28d9; }
.icon-steel   { background: rgba(51,65,85,0.08);      color: #334155; }
.icon-sapphire{ background: rgba(29,78,216,0.08);     color: #1d4ed8; }
.icon-electric{ background: rgba(14,165,233,0.08);    color: #0ea5e9; }
.icon-aurora  { background: rgba(124,58,237,0.08);    color: #7c3aed; }
.icon-graphite{ background: rgba(55,65,81,0.08);      color: #374151; }
.icon-iron    { background: rgba(72,72,74,0.08);      color: #48484a; }
.icon-jade    { background: rgba(13,148,136,0.08);    color: #0d9488; }
.icon-cobalt  { background: rgba(29,78,216,0.08);     color: #1d4ed8; }
.icon-azure   { background: rgba(2,132,199,0.08);     color: #0284c7; }
.icon-rocket  { background: rgba(220,38,38,0.08);     color: #dc2626; }
.icon-fern    { background: rgba(34,197,94,0.08);     color: #16a34a; }
.icon-copper  { background: rgba(194,65,12,0.08);     color: #c2410c; }
.icon-gold    { background: rgba(120,53,15,0.08);    color: #b45309; }
.icon-sky     { background: rgba(12,74,110,0.08);    color: #0369a1; }

/* Badge — aligned to design system */
.card-badge {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  align-self: flex-start;
  white-space: nowrap;
}
.badge-new  { background: var(--good-bg);  color: var(--good); }
.badge-beta { background: var(--warn-bg);  color: var(--warn); }
.badge-soon { background: var(--bg-row);   color: var(--text-2); border: 1px solid var(--border-2); }
.badge-empty { visibility: hidden; }

.card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.card-desc {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Card footer */
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  transition: background .15s;
  gap: 8px;
}

.card-tag {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.open-link .arrow { transition: transform .15s ease; }
.tool-card:hover .open-link { color: var(--accent-2); }
.tool-card:hover .open-link .arrow { transform: translateX(3px); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border-2);
  background: var(--bg-panel);
  padding: 20px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-text {
  margin: 0;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  color: var(--text-2);
}
.footer-meta {
  margin: 0;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 11px;
  color: var(--text-3);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 720px) {
  .header-sub { display: none; }
  .tools-grid { grid-template-columns: 1fr; gap: 8px; }
  .tab-btn { padding: 12px 12px 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card, .open-link .arrow { transition: none; }
}

/* =========================================================
   Feedback button (header)
   ========================================================= */
.feedback-trigger {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--bg-panel);
  color: var(--text-2);
  border: 1px solid var(--border-2);
  border-radius: 0;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.feedback-trigger:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* =========================================================
   Feedback overlay
   ========================================================= */
.feedback-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 14, 20, 0.4);
  z-index: 40;
}
.feedback-overlay.open { display: block; }

/* =========================================================
   Feedback slide-in panel
   ========================================================= */
.feedback-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bg-panel);
  border-left: 1px solid var(--border-2);
  z-index: 50;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.feedback-panel.open {
  transform: translateX(0);
}

.feedback-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-2);
  flex-shrink: 0;
}
.feedback-panel-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.feedback-close {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: 0;
  cursor: pointer;
  color: var(--text-3);
  padding: 0;
}
.feedback-close:hover { color: var(--text); background: var(--bg-row); }
.feedback-close svg { width: 14px; height: 14px; }

.feedback-panel-body {
  padding: 20px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feedback-intro {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.feedback-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.feedback-label {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.feedback-select {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  border-radius: 0;
  width: 100%;
  cursor: pointer;
}
.feedback-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Type chips */
.feedback-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fb-chip {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border: 1px solid var(--border-2);
  border-radius: 20px;
  background: var(--bg-panel);
  color: var(--text-2);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.fb-chip:hover { background: var(--bg-row); }
.fb-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.feedback-textarea {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  padding: 9px 10px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  border-radius: 0;
  width: 100%;
  resize: vertical;
  line-height: 1.55;
}
.feedback-textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.feedback-textarea::placeholder { color: var(--text-3); }

.feedback-submit {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: opacity .15s;
  align-self: flex-start;
}
.feedback-submit:hover { opacity: 0.88; }
.feedback-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.feedback-status {
  margin: 0;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 0;
}
.feedback-status.success {
  background: var(--good-bg);
  color: var(--good);
  border: 1px solid rgba(22,101,52,0.2);
}
.feedback-status.error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(153,27,27,0.2);
}

@media (max-width: 640px) {
  .feedback-panel { width: 100vw; }
  .feedback-trigger span { display: none; }
}

/* =========================================================
   Footer right & security trigger
   ========================================================= */
.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.security-trigger {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  background: none;
  color: var(--text-3);
  border: 1px solid var(--border-2);
  border-radius: 0;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.security-trigger:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

/* =========================================================
   Security modal
   ========================================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 14, 20, 0.5);
  z-index: 60;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-kicker {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 4px;
}

.modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

.modal-close {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: 0;
  cursor: pointer;
  color: var(--text-3);
  flex-shrink: 0;
  padding: 0;
}
.modal-close:hover { color: var(--text); background: var(--bg-row); }
.modal-close svg { width: 14px; height: 14px; }

.modal-body {
  padding: 20px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-lead {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  padding: 12px 14px;
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
}

.modal-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.modal-body p {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}

.modal-read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-decoration: none;
  padding-top: 4px;
}
.modal-read-more:hover { color: var(--accent-2); }

/* =========================================================
   Header actions group
   ========================================================= */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* =========================================================
   AI trigger button
   ========================================================= */
.ai-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  transition: opacity .15s;
}
.ai-trigger:hover { opacity: 0.88; }
.ai-trigger svg { flex-shrink: 0; }

/* =========================================================
   AI helper modal
   ========================================================= */
.ai-modal { max-width: 560px; }

.ai-modal-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.ai-textarea {
  flex: 1;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  padding: 9px 10px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  border-radius: 0;
  resize: none;
  line-height: 1.55;
}
.ai-textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.ai-textarea::placeholder { color: var(--text-3); }

.ai-submit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 9px 14px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
  flex-shrink: 0;
}
.ai-submit:hover { opacity: 0.85; }
.ai-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.ai-input-actions { display: flex; align-items: flex-start; gap: 6px; flex-shrink: 0; flex-direction: column; }
.ai-lang-select {
  padding: 4px 7px;
  font-size: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text-2);
  border-radius: 0;
  cursor: pointer;
  outline: none;
  width: 100%;
}
.ai-lang-select:focus { outline: 2px solid var(--accent); }

/* Loading dots */
.ai-loading {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
}
.ai-loading-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: ai-pulse 1.2s ease-in-out infinite;
}
.ai-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* AI response area */
.ai-response {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-tool-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ai-tool-result:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.ai-tool-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ai-tool-name-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.ai-tool-name-link:hover { text-decoration: underline; }

.ai-tool-reason {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.ai-tool-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-top: 2px;
}
.ai-tool-link:hover { color: var(--accent-2); }

.ai-no-match {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

/* Footer note */
.ai-footer-note {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.5;
}
.ai-feedback-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
}
.ai-feedback-link:hover { color: var(--accent-2); }

@media (max-width: 640px) {
  .ai-trigger span { display: none; }
  .header-sub { display: none; }
}

/* =========================================================
   Card wrapper & info button
   ========================================================= */
.tool-card-wrap {
  position: relative;
}

.card-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  margin: -10px -12px;
  background: none;
  border: none;
  border-radius: 6px;
  position: relative;
  z-index: 1;
  cursor: pointer;
  color: var(--accent);
  transition: color .15s;
}
.card-info-btn:hover { color: var(--accent-2); }
.card-info-btn svg { flex-shrink: 0; }

/* =========================================================
   Tool detail modal
   ========================================================= */
.tool-detail-modal { max-width: 560px; }

.tool-detail-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-detail-body {
  padding: 18px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool-detail-desc {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
  padding: 12px 14px;
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
}

.tool-detail-video {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  background: #000;
  line-height: 0;
}
.tool-detail-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.tool-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
}

.tool-detail-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.tool-detail-row:last-child { border-bottom: none; }

.tool-detail-row-label {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 12px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
}

.tool-detail-row-value {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  padding: 10px 14px;
}

.tool-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  margin-top: 18px;
  gap: 12px;
}

.tool-detail-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  text-decoration: none;
  transition: opacity .15s;
}
.tool-detail-open:hover { opacity: 0.85; color: var(--bg); }

.tool-detail-feedback {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 14px;
  background: var(--bg-panel);
  color: var(--text-2);
  border: 1px solid var(--border-2);
  border-radius: 0;
  cursor: pointer;
  transition: background .15s;
}
.tool-detail-feedback:hover { background: var(--bg-row); }

/* =========================================================
   AI reset button
   ========================================================= */
.ai-reset-btn {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 14px;
  background: var(--bg);
  color: var(--text-2);
  border: 1px solid var(--border-2);
  border-radius: 0;
  cursor: pointer;
  transition: background .15s;
  align-self: flex-start;
}
.ai-reset-btn:hover { background: var(--bg-row); }

/* =========================================================
   Feedback optional contact fields
   ========================================================= */
.feedback-optional-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.feedback-optional-hint {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}
.feedback-input {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  border-radius: 0;
  width: 100%;
}
.feedback-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.feedback-input::placeholder { color: var(--text-3); }
