/* AI Assistant: the page-owned pieces (Claude Design handoff, assistant.css §1-2).
   The Ask bar (form.askbar) and "Ask about this" buttons ([data-ask]); widget.js opens the assistant for both.
   The assistant itself (launcher, panel, "Show me") is styled inside the widget's shadow root. */
:root {
  --twa-accent: #111111;      /* data-accent on the script tag */
  --twa-accent-text: #ffffff; /* data-accent-text */
  --twa-hl: #FF4D00;          /* data-highlight (defaults to the accent) */
  --twa-ink: #1A1A1A;
  --twa-ink2: #5C5C5C;        /* 6.3:1 on white, 5.9:1 on #F9F7F2 */
  --twa-line: #E6E3DC;
  --twa-soft: #F6F4EF;
  --twa-field: #CFCBC2;
}

/* ── 1. Ask bar ─────────────────────────────────────────────────────────── */
.askbar { width: 100%; max-width: 760px; font-family: inherit; color: var(--twa-ink); }
.askbar-label {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  margin-bottom: 12px; font-size: 15px; line-height: 1.3;
}
.askbar-label b { font-weight: 700; }
.askbar-label .askbar-sub { color: var(--twa-ink2); }
.askbar-mark, .twa-mark {
  flex: none; display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--twa-accent); color: var(--twa-accent-text);
  font-family: 'Space Grotesk', inherit; font-weight: 700; font-size: 15px; line-height: 1;
}
.askbar-field {
  display: flex; align-items: center; gap: 8px;
  min-height: 76px; padding: 8px 8px 8px 24px;
  background: var(--askbar-bg, #fff); border: 2px solid var(--twa-ink); border-radius: var(--askbar-r, 24px);
  box-shadow: var(--askbar-shadow, 0 18px 40px -22px rgba(0,0,0,.45));
  transition: border-color .2s ease, box-shadow .2s ease;
}
.askbar-field:focus-within {
  border-color: var(--twa-ink);
  box-shadow: 0 0 0 4px rgba(255,77,0,.28), 0 18px 40px -22px rgba(0,0,0,.45);
}
.askbar-input {
  flex: 1; min-width: 0; height: 56px; border: 0; background: transparent;
  font: inherit; font-size: 19px; color: var(--twa-ink); outline: none;
}
.askbar .askbar-input:focus-visible { outline: none; }
.askbar-input::placeholder { color: #6E6E6E; opacity: 1; }
.askbar-go {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 24px; border: 0; border-radius: max(0px, calc(var(--askbar-r, 24px) - 7px));
  background: var(--askbar-go, var(--twa-ink)); color: var(--askbar-go-text, #fff); font: inherit; font-weight: 700; font-size: 16px;
  cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.askbar-go:hover { background: var(--askbar-go-hover, var(--twa-hl)); color: var(--twa-ink); }
.askbar-go svg { width: 18px; height: 18px; }
/* "Try" sits on its own line; the questions wrap under it, every one starting at the same left edge as the field */
.askbar-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.askbar-try { flex: 0 0 100%; margin-bottom: 2px; font-size: 13px; font-weight: 700; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; color: var(--twa-ink2); }
.askchip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(0,0,0,.16); border-radius: var(--askchip-r, 999px); background: rgba(255,255,255,.7);
  font: inherit; font-size: 14px; font-weight: 600; color: var(--twa-ink); text-align: left; cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.askchip:hover { border-color: var(--twa-ink); background: #fff; }
.askbar-fine { margin-top: 12px; font-size: 13px; line-height: 1.45; color: var(--twa-ink2); }

/* Ask bar on a dark section (landing-page closing CTA) */
.askbar--dark { color: #fff; }
.askbar--dark .askbar-label .askbar-sub, .askbar--dark .askbar-fine, .askbar--dark .askbar-try { color: #B3B3B3; }
.askbar--dark .askbar-field { border-color: #fff; }
.askbar--dark .askchip { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.askbar--dark .askchip:hover { border-color: #fff; }

@media (max-width: 600px) {
  .askbar-field { min-height: 64px; padding: 6px 6px 6px 18px; border-radius: var(--askbar-r, 20px); }
  .askbar-input { height: 50px; font-size: 17px; }
  .askbar-go { height: 50px; width: 50px; padding: 0; }
  .askbar-go span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .askchip { font-size: 14px; }
}

/* ── 2. "Ask about this" ───────────────────────────────────────────────── */
.ask-this {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px;
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--twa-ink);
  text-decoration: underline; text-decoration-color: rgba(0,0,0,.25); text-underline-offset: 4px; cursor: pointer;
  transition: text-decoration-color .2s ease, color .2s ease;
}
.ask-this svg { width: 18px; height: 18px; flex: none; color: var(--twa-hl); }
.ask-this:hover { text-decoration-color: currentColor; }
.ask-this--dark { color: #fff; text-decoration-color: rgba(255,255,255,.35); }
.ask-this--pill {
  padding: 0 16px; border: 1px solid rgba(0,0,0,.14); border-radius: 999px; background: #fff; text-decoration: none;
}
.ask-this--pill:hover { border-color: var(--twa-ink); }
.featured .ask-this--pill, .ask-this--pill.on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.featured .ask-this--pill:hover, .ask-this--pill.on-dark:hover { border-color: #fff; }

.askbar :focus-visible, .ask-this:focus-visible, .askchip:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .askbar-field, .askbar-go { transition: none !important; } }
/* visually hidden (for pages without Tailwind) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
