/* ════════════════════════════════════════════════════════════════════
   OVERVIEW HOME: "Set up Browsa" card (.hs-*) and the Guides grid
   (.hg-*). Loaded after app.css. Only theme tokens; the base rules are
   the dark look, [data-theme="light"] lines adjust surfaces the same
   way app.css does for .ov-panel (elevated in dark, surface in light).
   ════════════════════════════════════════════════════════════════════ */

/* ── Card shell ────────────────────────────────────────────────────── */
.hs {
  background: var(--vercel-elevated);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
  margin-bottom: 16px;
}
:root[data-theme="light"] .hs { background: var(--vercel-surface); }

.hs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hs-head-text { min-width: 0; }
.hs-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--vercel-text);
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
}
.hs-time {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0;
  color: var(--vercel-muted);
  padding: 2px 8px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--vercel-border-strong);
}
.hs-time svg { width: 12px; height: 12px; }
.hs-sub { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--vercel-muted); }
.hs-sub b { color: var(--vercel-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hs.collapsed .hs-sub { display: none; }
.hs.collapsed .hs-title { font-size: 15px; }

.hs-toggle {
  flex-shrink: 0;
  font: 500 12.5px/1 var(--font-sans);
  color: var(--vercel-muted);
  background: transparent; border: none; cursor: pointer;
  padding: 7px 10px; border-radius: var(--radius);
  transition: background 120ms ease, color 120ms ease;
}
.hs-toggle:hover { background: var(--vercel-hover); color: var(--vercel-text); }
.hs-toggle:focus-visible { outline: none; box-shadow: var(--vercel-focus); }

.hs-body { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.hs-body[hidden] { display: none; }

.hs-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.hs-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* inline code chips inside running text */
.hs-sub code, .hs-note code, .hs-mcp-text code, .hg-desc code {
  font-size: 0.9em; padding: 1px 5px;
  background: var(--vercel-bg); color: var(--vercel-text);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
  border-radius: var(--radius-sm);
}

/* ── API key row ──────────────────────────────────────────────────── */
.hs-key {
  display: grid; grid-template-columns: 240px minmax(0, 1fr);
  gap: 8px 20px; align-items: center;
  padding-bottom: 16px;
  box-shadow: inset 0 -1px 0 var(--vercel-border);
}
.hs-key-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hs-label { font-size: 13.5px; font-weight: 600; color: var(--vercel-text); }
.hs-hint { font-size: 12px; line-height: 1.45; color: var(--vercel-muted); }

.hs-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.hs-field {
  flex: 1 1 260px; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 12px;
  background: var(--vercel-bg);
  box-shadow: inset 0 0 0 1px var(--vercel-border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.hs-field-muted { font-size: 13px; color: var(--vercel-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-key-prefix, .hs-key-secret, .hs-cmd-text {
  background: none; box-shadow: none; padding: 0; border-radius: 0;
  font-family: var(--font-mono); font-size: 13px; color: var(--vercel-text);
  white-space: nowrap;
}
.hs-key-prefix { flex-shrink: 0; }
.hs-key-dots { color: var(--vercel-disabled); letter-spacing: 1px; margin-left: 1px; }
.hs-key-name {
  margin-left: auto; min-width: 0;
  font-size: 12px; color: var(--vercel-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hs-key-count { flex-shrink: 0; font-size: 12px; color: var(--vercel-muted); }
.hs-btn { flex-shrink: 0; height: 40px; font-size: 13.5px; }
.hs-btn.copied { color: var(--accent); }

.hs-field-reveal {
  background: var(--accent-faint);
  box-shadow: inset 0 0 0 1px var(--border-accent);
  overflow-x: auto;
}
.hs-key-secret { user-select: all; }
.hs-key-warn {
  flex-basis: 100%;
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--amber);
}
.hs-key-warn svg { width: 14px; height: 14px; flex-shrink: 0; }
.hs-key-warn span { color: var(--vercel-text); }
.hs-text-btn {
  margin-left: auto; flex-shrink: 0;
  font: 500 12.5px/1 var(--font-sans);
  color: var(--vercel-muted); background: none; border: none; cursor: pointer;
  padding: 6px 8px; border-radius: var(--radius-sm);
}
.hs-text-btn:hover { color: var(--vercel-text); background: var(--vercel-hover); }

/* ── Two paths: option list (left) + pane (right) ─────────────────── */
.hs-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.hs-options { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hs-seg { display: flex; flex-direction: column; gap: 8px; }

.hs-opt {
  display: flex; align-items: flex-start; gap: 11px;
  width: 100%; text-align: left;
  padding: 11px 12px;
  font: inherit; color: var(--vercel-text);
  background: transparent; border: none; cursor: pointer;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
  transition: background 120ms ease, box-shadow 120ms ease;
}
.hs-opt:hover { background: var(--vercel-hover); }
.hs-opt[aria-selected="true"] {
  background: var(--accent-faint);
  box-shadow: inset 0 0 0 1px var(--border-accent);
}
.hs-opt:focus-visible { outline: none; box-shadow: var(--vercel-focus); }
.hs-opt-ico {
  width: 30px; height: 30px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--vercel-bg); color: var(--vercel-muted);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
}
.hs-opt-ico svg { width: 16px; height: 16px; }
.hs-opt[aria-selected="true"] .hs-opt-ico { color: var(--accent); box-shadow: inset 0 0 0 1px var(--border-accent); }
.hs-opt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hs-opt-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.hs-opt-sub { font-size: 12px; line-height: 1.45; color: var(--vercel-muted); }

/* MCP one-liner under the options */
.hs-mcp {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
}
.hs-mcp-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hs-mcp-tag {
  font: 600 10.5px/1 var(--font-mono); letter-spacing: .04em;
  color: var(--vercel-text);
  padding: 4px 6px; border-radius: var(--radius-sm);
  background: var(--vercel-bg);
  box-shadow: inset 0 0 0 1px var(--vercel-border-strong);
}
.hs-mcp-text { font-size: 12.5px; line-height: 1.45; color: var(--vercel-muted); }
.hs-mcp .hs-cmd { height: 34px; }
.hs-mcp .hs-link { font-size: 12.5px; }

/* ── Pane content ─────────────────────────────────────────────────── */
.hs-panes { min-width: 0; }
.hs-pane[hidden] { display: none; }

.hs-langs {
  display: inline-flex; gap: 2px; padding: 2px;
  background: var(--vercel-bg);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
  border-radius: var(--radius);
  margin-bottom: 4px;
}
.hs-lang {
  font: 500 12.5px/1 var(--font-sans);
  color: var(--vercel-muted);
  background: transparent; border: none; cursor: pointer;
  padding: 6px 12px; border-radius: var(--radius-sm);
  transition: background 120ms ease, color 120ms ease;
}
.hs-lang:hover { color: var(--vercel-text); }
.hs-lang.active { color: var(--vercel-text); background: var(--vercel-hover); box-shadow: inset 0 0 0 1px var(--vercel-border-strong); }
:root[data-theme="light"] .hs-lang.active { background: var(--vercel-surface); box-shadow: inset 0 0 0 1px var(--vercel-border-strong), 0 1px 2px rgba(15,22,19,.06); }
.hs-lang:focus-visible { outline: none; box-shadow: var(--vercel-focus); }

.hs-step {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 6px;
  font-size: 12.5px; font-weight: 500; color: var(--vercel-text);
}
.hs-pane > .hs-step:first-child { margin-top: 0; }
.hs-step-n {
  width: 18px; height: 18px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 10.5px/1 var(--font-mono);
  color: var(--vercel-muted);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--vercel-border-strong);
}

.hs-cmd {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 4px 0 12px;
  background: var(--vercel-bg);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
  border-radius: var(--radius);
  min-width: 0;
}
.hs-sign { font: 500 13px/1 var(--font-mono); color: var(--vercel-disabled); user-select: none; }
.hs-cmd-text { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.hs-cmd-text::-webkit-scrollbar { display: none; }

.hs-copy {
  width: 30px; height: 30px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--vercel-muted);
  background: transparent; border: none; cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 120ms ease, color 120ms ease;
}
.hs-copy svg { width: 15px; height: 15px; }
.hs-copy:hover { background: var(--vercel-hover); color: var(--vercel-text); }
.hs-copy:focus-visible { outline: none; box-shadow: var(--vercel-focus); }
.hs-copy.copied { color: var(--accent); }

.hs-code {
  position: relative;
  background: var(--vercel-bg);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
  border-radius: var(--radius);
}
.hs-code pre {
  margin: 0;
  padding: 12px 44px 12px 14px;
  font: 400 12.5px/1.7 var(--font-mono);
  color: var(--vercel-text);
  background: none; border: none;
  overflow-x: auto; white-space: pre;
}
.hs-code .hs-copy { position: absolute; top: 6px; right: 6px; }
.hs-k { color: var(--iris); }
.hs-s { color: var(--accent); }
.hs-f { color: var(--amber); }

.hs-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--vercel-muted); }

.hs-agent {
  background: var(--vercel-bg);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
  border-radius: var(--radius);
  padding: 14px;
}
.hs-agent-text { margin: 0; font-size: 13px; line-height: 1.6; color: var(--vercel-text); overflow-wrap: anywhere; }
.hs-agent-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px;
  box-shadow: inset 0 1px 0 var(--vercel-border);
}
.hs-agent-hint { font-size: 12px; color: var(--vercel-muted); }
.hs-btn-sm { height: 32px; font-size: 13px; padding: 0 12px; }
.hs-btn-sm.copied { color: var(--accent); }

.hs-foot {
  margin: 0; padding-top: 14px;
  font-size: 12.5px; color: var(--vercel-muted);
  box-shadow: inset 0 1px 0 var(--vercel-border);
}

/* ── Guides grid ──────────────────────────────────────────────────── */
.hg { margin-bottom: 24px; }
.hg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.hg-title { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--vercel-text); }
.hg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hg-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px;
  background: var(--vercel-elevated);
  box-shadow: inset 0 0 0 1px var(--vercel-border);
  border-radius: var(--radius);
  color: var(--vercel-text); text-decoration: none;
  transition: background 120ms ease, box-shadow 120ms ease;
}
.hg-card:hover { background: var(--vercel-hover); box-shadow: inset 0 0 0 1px var(--vercel-border-strong); }
.hg-card:focus-visible { outline: none; box-shadow: var(--vercel-focus); }
:root[data-theme="light"] .hg-card { background: var(--vercel-surface); }
:root[data-theme="light"] .hg-card:hover {
  background: var(--vercel-surface);
  box-shadow: inset 0 0 0 1px var(--vercel-border-strong), 0 12px 24px -20px rgba(15,22,19,.28);
}
.hg-ico {
  width: 28px; height: 28px; margin-bottom: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--accent-faint); color: var(--accent);
}
.hg-ico svg { width: 15px; height: 15px; }
.hg-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.hg-desc { font-size: 12.5px; line-height: 1.5; color: var(--vercel-muted); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hs-key { grid-template-columns: 1fr; }
  .hs-grid { grid-template-columns: 260px minmax(0, 1fr); }
  .hg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  /* Stack as: path tabs, the selected pane, then the MCP line, so the
     tabs sit directly above the content they switch. */
  .hs-grid { grid-template-columns: 1fr; gap: 16px; }
  .hs-options { display: contents; }
  .hs-seg { order: 1; }
  .hs-panes { order: 2; }
  .hs-mcp { order: 3; }
  .hs-seg { flex-direction: row; }
  .hs-opt { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 560px) {
  .hs { padding: 16px 14px 14px; }
  .hs-seg { flex-direction: column; }
  .hs-opt-sub { display: none; }
  .hs-opt { align-items: center; padding: 9px 10px; }
  .hs-field { flex-basis: 100%; }
  .hs-key-row > .hs-btn { flex: 1 1 100%; }
  .hs-key-warn { flex-wrap: wrap; }
  .hg-grid { grid-template-columns: 1fr; }
}
