/* ════════════════════════════════════════════════════════════════════
   HOME 2 (2026-11-07): Browser Use's home layout with Browsa's brand.
   Eyebrow + logo title, a big composer, example chips, two product
   cards, the coding-agent prompt and the API key + usage card. Overrides
   the composer rules in app-composer.css. Theme tokens only.
   ════════════════════════════════════════════════════════════════════ */

.hm { max-width: 1100px; margin: 0 auto; padding-top: 72px; }

.hm-eyebrow {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--vercel-muted);
  margin-bottom: 14px;
}
.hm-title {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 30px;
  font: 600 42px/1 var(--font-display); letter-spacing: -0.03em;
  color: var(--vercel-text);
}
.hm-mark { width: 46px; height: 46px; color: var(--accent); flex-shrink: 0; }

/* ── Composer ───────────────────────────────────────────────────────── */
.hm .cmp {
  background: transparent; box-shadow: none;
  padding: 0; margin: 0 0 54px; border-radius: 0;
}
:root[data-theme="light"] .hm .cmp { background: transparent; }
.hm .cmp-box {
  border-radius: 18px;
  background: var(--vercel-surface);
  box-shadow: inset 0 0 0 1px var(--vercel-border-strong), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 140ms ease;
}
:root[data-theme="light"] .hm .cmp-box { background: #FFFFFF; }
.hm .cmp-box:focus-within {
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-faint);
}
.hm .cmp-box textarea {
  min-height: 96px; padding: 22px 24px 8px;
  font-size: 16.5px; line-height: 1.55;
}
.hm .cmp-bar { padding: 10px 14px 14px 18px; gap: 10px; }
.hm .cmp-tools { gap: 4px; }
.hm .cmp-chip {
  height: 34px; padding: 0 10px; gap: 7px;
  box-shadow: none; border-radius: 10px;
  font-size: 14px;
}
.hm .cmp-chip svg { width: 17px; height: 17px; }
.hm .cmp-chip .cmp-caret { width: 14px; height: 14px; color: var(--vercel-muted); }
.hm .cmp-chip.cmp-icon { width: 34px; padding: 0; justify-content: center; color: var(--vercel-muted); }
.hm .cmp-chip-quiet { color: var(--vercel-muted); }
.hm .cmp-chip:focus-visible { box-shadow: var(--vercel-focus); }
.hm .cmp-end { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.hm .cmp-cost { font-size: 12px; }
.hm .cmp-run {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  border: none; border-radius: 50%; cursor: pointer;
  background: var(--vercel-text); color: var(--vercel-bg);
  box-shadow: none;
  transition: background 140ms ease, transform 120ms ease, opacity 140ms ease;
}
.hm .cmp-run svg { width: 19px; height: 19px; }
.hm .cmp-run:hover { background: var(--accent); color: var(--on-accent); }
.hm .cmp-run:active { transform: scale(0.94); }
.hm .cmp-run:focus-visible { outline: none; box-shadow: var(--vercel-focus); }
/* Quiet until there is a task to send (Browser Use greys it out). */
.hm .cmp-box:has(textarea:placeholder-shown) .cmp-run { opacity: 0.45; }
@media (prefers-reduced-motion: reduce) { .hm .cmp-run:active { transform: none; } }

.hm .cmp-pop { border-radius: 12px; }
.hm .cmp-settings { width: 340px; }
.cmp-set-head {
  font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--vercel-muted);
}
.cmp-set-more {
  display: inline-flex; align-items: center; gap: 6px;
  padding-top: 10px; border-top: 1px solid var(--vercel-border);
  font-size: 13px; font-weight: 500; color: var(--vercel-text); text-decoration: none;
}
.cmp-set-more svg { width: 14px; height: 14px; color: var(--vercel-muted); }
.cmp-set-more:hover { color: var(--accent); }
.cmp-set-more:hover svg { color: var(--accent); }
.cmp-steps-menu { min-width: 220px; }

.hm .cmp-note { margin-top: 12px; border-radius: 12px; }

/* Example chips */
.hm .cmp-examples { margin-top: 18px; gap: 10px; align-items: center; }
.hm .cmp-chips { gap: 10px; }
.hm .cmp-ex {
  height: 38px; padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--vercel-border-strong);
  font-size: 14px; color: var(--vercel-muted);
}
.hm .cmp-ex:hover { color: var(--vercel-text); background: var(--vercel-hover); }
.hm .cmp-shuffle { width: 38px; height: 38px; box-shadow: inset 0 0 0 1px var(--vercel-border-strong); }
.hm .cmp-shuffle svg { width: 16px; height: 16px; }

/* ── Product cards ──────────────────────────────────────────────────── */
.hm-products {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
  margin-bottom: 24px;
}
.hm-prod {
  position: relative;
  display: flex; align-items: center; gap: 18px;
  height: 96px; padding-right: 22px;
  border: 1px solid var(--vercel-border-strong);
  border-radius: 16px; overflow: hidden;
  background: var(--vercel-surface);
  color: var(--vercel-text); text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
:root[data-theme="light"] .hm-prod { background: #FFFFFF; }
.hm-prod:hover { border-color: var(--border-accent); box-shadow: 0 4px 18px -10px var(--accent-glow); }
.hm-prod:focus-visible { outline: none; box-shadow: var(--vercel-focus); }
/* Abstract Browsa-green panel: a soft mint wash plus a dot grid. */
.hm-prod-art {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 96px; height: 100%; flex-shrink: 0;
  color: var(--accent);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--accent) 34%, transparent) 1px, transparent 1.4px) 0 0 / 8px 8px,
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 4%, transparent) 70%);
  border-right: 1px solid var(--vercel-border);
}
.hm-art-browser {
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--accent) 30%, transparent) 1px, transparent 1.4px) 0 0 / 8px 8px,
    linear-gradient(225deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--accent) 3%, transparent) 72%);
}
.hm-prod-art svg {
  width: 30px; height: 30px; padding: 8px; box-sizing: content-box;
  border-radius: 12px;
  background: var(--vercel-surface);
  box-shadow: 0 0 0 1px var(--border-accent);
}
:root[data-theme="light"] .hm-prod-art svg { background: #FFFFFF; }
.hm-prod-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.hm-prod-name { font: 600 17px/1.2 var(--font-display); letter-spacing: -0.01em; }
.hm-prod-sub { font-size: 14px; color: var(--vercel-muted); }
.hm-prod-arrow { width: 18px; height: 18px; color: var(--vercel-muted); flex-shrink: 0; transition: transform 140ms ease, color 140ms ease; }
.hm-prod:hover .hm-prod-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ── Coding agent + API key / usage ─────────────────────────────────── */
.hm-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px;
  margin-bottom: 32px;
}
.hm-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--vercel-border-strong);
  border-radius: 16px;
  background: var(--vercel-surface);
  min-width: 0;
}
:root[data-theme="light"] .hm-card { background: #FFFFFF; }
.hm-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.hm-card-title {
  margin: 0;
  font: 600 17px/1.3 var(--font-display); letter-spacing: -0.01em;
  color: var(--vercel-text);
}
.hm-card-hint { font-size: 12px; color: var(--vercel-muted); padding-top: 3px; white-space: nowrap; }
.hm-link {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-size: 14px; color: var(--vercel-muted); text-decoration: none;
}
.hm-link svg { width: 15px; height: 15px; }
.hm-link:hover { color: var(--vercel-text); }
.hm-link:focus-visible { outline: none; box-shadow: var(--vercel-focus); border-radius: 4px; }

.hm-agent { padding: 22px 24px 20px; position: relative; }
.hm-agent-preview {
  position: relative; flex: 1 1 0;
  min-height: 200px; max-height: 420px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 96%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 96%);
}
.hm .hs-agent-text {
  margin: 0;
  font: 400 12.5px/1.75 var(--font-mono);
  color: var(--vercel-muted);
  opacity: 0.8;
  white-space: pre-line;
  user-select: text;
}
.hm-agent-foot { display: flex; justify-content: flex-end; margin-top: -34px; position: relative; }
.hm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: none; border-radius: 10px; cursor: pointer;
  background: var(--vercel-surface); color: var(--vercel-text);
  box-shadow: inset 0 0 0 1px var(--vercel-border-strong), 0 1px 2px rgba(0, 0, 0, 0.05);
  font: 500 14px/1 var(--font-sans);
  transition: background 120ms ease;
}
:root[data-theme="light"] .hm-btn { background: #FFFFFF; }
.hm-btn:hover { background: var(--vercel-hover); }
.hm-btn:focus-visible { outline: none; box-shadow: var(--vercel-focus); }
.hm-btn.copied { color: var(--accent); }

.hm-keycard { overflow: hidden; }
.hm-keybox { padding: 22px 24px 22px; border-bottom: 1px solid var(--vercel-border); }
/* #hs-key states come from hsRenderKey(): field + button, or the
   one-time reveal with its warning. Lay them out as one column. */
.hm .hm-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hm .hm-key-row .hs-field {
  flex: 1 1 220px; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 14px;
  border-radius: 10px;
  background: var(--vercel-bg);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
  font-size: 13.5px;
}
.hm .hm-key-row .hs-btn {
  height: 42px; padding: 0 16px; border-radius: 10px; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.hm .hm-key-row .hs-key-warn { flex: 1 1 100%; }

.hm-usage { padding: 20px 24px 22px; flex: 1; display: flex; flex-direction: column; }
.hm-usage .hm-card-head { margin-bottom: 12px; }
.hm-recent { margin: 0 -8px; }
.hm-usage-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--vercel-muted); }
.hm-usage-meta a { color: inherit; text-decoration: none; }
.hm-usage-meta a:hover { color: var(--vercel-text); }
.hm-num { font: 600 13px/1 var(--font-mono); color: var(--vercel-text); font-variant-numeric: tabular-nums; }
#ov-cap.busy .hm-num { color: var(--accent); }
#ov-cap.full .hm-num { color: var(--amber); }
.hm-dot { color: var(--vercel-border-strong); }

.hm-recent { display: flex; flex-direction: column; flex: 1; min-height: 120px; }
.hm .ovr-row {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  height: 42px; padding: 0 8px;
  border-radius: 8px;
  color: var(--vercel-text); text-decoration: none;
  font-size: 13.5px;
}
.hm .ovr-row:hover { background: var(--vercel-hover); }
.hm .ovr-row:focus-visible { outline: none; box-shadow: var(--vercel-focus); }
.hm .ovr-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm .ovr-cost { font: 500 12px/1 var(--font-mono); color: var(--vercel-muted); }
.hm .ovr-time { font-size: 12.5px; color: var(--vercel-muted); white-space: nowrap; min-width: 56px; text-align: right; }
.hm .ovr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vercel-muted); }
.hm .ovr-completed { background: var(--accent); }
.hm .ovr-failed { background: var(--red); }
.hm .ovr-running, .hm .ovr-input_required { background: var(--amber); }
.hm .ovr-cancelled { background: var(--vercel-disabled); }
.hm .ovr-empty {
  margin: auto; padding: 24px 0;
  font-size: 14px; color: var(--vercel-muted); text-align: center;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hm { padding-top: 40px; }
  .hm-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .hm { padding-top: 12px; }
  .hm-title { font-size: 32px; margin-bottom: 22px; }
  .hm-mark { width: 36px; height: 36px; }
  .hm .cmp { margin-bottom: 36px; }
  .hm-products { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hm-prod { height: 80px; }
  .hm-prod-art { width: 80px; }
  .hm .cmp-ex { height: 34px; padding: 0 13px; font-size: 13px; max-width: none; flex-shrink: 0; }
  /* One swipeable row of examples instead of four wrapped rows. */
  .hm .cmp-chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: -2px 0; padding: 2px 0;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .hm .cmp-chips::-webkit-scrollbar { display: none; }
  .hm .cmp-shuffle { width: 34px; height: 34px; }
  .hm .cmp-cost { display: none; }
  .hm-agent, .hm-keybox, .hm-usage { padding-left: 18px; padding-right: 18px; }
  .hm-card-hint { display: none; }
}
@media (max-width: 640px) {
  /* app-composer.css wraps the bar at 640px; keep tools and send on one row. */
  .hm .cmp-bar { flex-wrap: nowrap; }
  .hm .cmp-tools { flex: 1 1 auto; flex-wrap: nowrap; min-width: 0; }
  .hm .cmp-tools > .cmp-pop-wrap:nth-child(2) { min-width: 0; }
  .hm .cmp-chip-label { max-width: 34vw; }
}
@media (max-width: 400px) {
  .hm .cmp-chip-quiet { display: none; }
}
