@import url("webz-brand.css");

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 32px 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  height: 28px;
  width: auto;
}

.brand-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.topbar-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.topbar-link:hover {
  text-decoration: underline;
}

.hero,
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 32px;
  overflow: hidden;
  box-shadow: 0 30px 60px 0 #2733400d;
}

.hero {
  margin-bottom: 20px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-ok {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.badge-warn {
  background: #fff8eb;
  color: var(--cta);
  border: 1px solid #fde68a;
}

.hero h1 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: 2.35rem;
  font-weight: 700;
  color: var(--text);
}

.hero h1 img {
  width: 42px;
  height: 42px;
}

.sub {
  color: var(--muted);
  margin: 0 0 16px;
}

h2 {
  margin-top: 0;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.section-title {
  margin-top: 0;
  font-size: 1.4rem;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
}

pre {
  background: #273340;
  color: #f8f8f8;
  border-radius: 12px;
  padding: 14px;
  overflow-x: auto;
  border: 1px solid #1e293b;
}

.note {
  background: var(--accent-soft);
  border: 1px solid #b8e4f7;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 16px;
}

.note strong {
  color: var(--text);
}

ul {
  padding-left: 18px;
}

li {
  margin-bottom: 8px;
}

.endpoint {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  background: #f3f4f6;
  border: 1px solid var(--border);
}

a {
  color: var(--accent);
}

/* token input */
.token-field {
  margin-bottom: 20px;
}

.token-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.token-input-row {
  display: flex;
  gap: 8px;
}

.token-input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s;
}

.token-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(68, 176, 231, 0.15);
}

.token-toggle {
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.token-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
}

.token-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* quick install (exa-style) */
.quick-install {
  margin-bottom: 20px;
}

.install-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.install-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.install-tab:hover {
  background: #f1f5f9;
  color: var(--text);
}

.install-tab.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.install-tab img {
  height: 18px;
  width: auto;
  object-fit: contain;
}

.install-panel {
  display: none;
}

.install-panel.active {
  display: block;
}

.install-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.install-panel-head img {
  height: 32px;
  width: auto;
}

.install-panel-head h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.install-btn:active {
  transform: scale(0.98);
}

.install-btn-primary {
  background: var(--cta);
  color: #fff;
}

.install-btn-primary:hover {
  background: var(--cta-hover);
  color: #fff;
}

.install-btn-secondary {
  background: var(--text);
  color: #fff;
}

.install-btn-secondary:hover {
  background: #1a242e;
  color: #fff;
}

.install-btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-soft);
}

.install-btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.install-btn:disabled,
.install-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.install-desc {
  margin: 0 0 14px;
  font-size: 0.98rem;
  color: var(--muted);
}

.install-steps {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 0.95rem;
}

.install-steps li {
  margin-bottom: 8px;
}

.install-command {
  margin-top: 12px;
}

.install-command pre {
  margin: 6px 0 0;
  font-size: 0.8rem;
}

/* command block with copy button */
.cmd-block {
  margin-top: 12px;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
}

.cmd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #1e293b;
}

.cmd-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #475569;
  border-radius: 6px;
  background: transparent;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.copy-btn:hover {
  background: #334155;
  border-color: var(--accent);
  color: #fff;
}

.copy-btn.copied {
  border-color: #22c55e;
  color: #22c55e;
}

.copy-btn.copied .copy-label::after {
  content: '!';
}

.copy-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.cmd-block pre {
  margin: 0;
  border: none;
  border-radius: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 14px 16px;
  max-height: 200px;
  overflow-x: auto;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.client-card .cmd-block {
  margin-top: 12px;
}

/* client grid */
.client-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

@media (max-width: 1200px) {
  .client-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .client-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.client-grid-cloud {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 720px) {
  .client-grid-cloud {
    grid-template-columns: 1fr;
  }
}

.client-card {
  background: #fafafa;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.client-card-featured {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border-color: #b8e4f7;
  box-shadow: 0 8px 24px rgba(68, 176, 231, 0.1);
}

.client-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.client-icon {
  width: auto;
  max-width: 100px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.client-icon-cursor {
  max-width: 90px;
  height: 26px;
  background: #000;
  padding: 4px 8px;
  border-radius: 8px;
}

.client-icon-claude {
  max-width: 85px;
  height: 26px;
}

.client-icon-chatgpt {
  max-width: 95px;
  height: 26px;
}

.client-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.client-badge {
  display: inline-block;
  margin-top: 1px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.client-badge-local {
  background: #ecfdf5;
  color: #059669;
}

.client-badge-cloud {
  background: var(--accent-soft);
  color: var(--accent);
}

.client-badge-cli {
  background: #fff8eb;
  color: var(--cta);
}

.client-steps {
  margin: 0 0 12px;
  padding-left: 16px;
  font-size: 0.82rem;
}

.client-steps li {
  margin-bottom: 4px;
}

.client-steps code {
  font-size: 0.75rem;
}

.client-desc {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.cloud-section-title {
  margin: 28px 0 16px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.config-paths {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.paths-title {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.paths-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.paths-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.os-badge {
  display: inline-block;
  flex-shrink: 0;
  min-width: 52px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  background: #e2e8f0;
  color: #475569;
}

.paths-list code {
  font-size: 0.7rem;
  word-break: break-all;
  line-height: 1.3;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.download-row {
  display: flex;
  gap: 6px;
}

.download-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: white;
  color: var(--text);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.download-btn:hover {
  background: #f1f5f9;
  border-color: var(--accent);
}

.config-preview {
  margin-top: 12px;
  min-width: 0;
}

.config-preview pre {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 14px 16px;
  max-height: 160px;
  overflow-x: auto;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* tool reference */
.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid #dbdcdd;
  border-radius: 12px;
  background: #fff;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.88rem;
  table-layout: fixed;
}

.ref-table th,
.ref-table td {
  border: 1px solid #dbdcdd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.ref-table thead th {
  background: #eef3f8;
  font-weight: 600;
  border-bottom: 2px solid #c5cdd6;
}

.ref-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.ref-table tbody tr:hover {
  background: #f3f7fb;
}

.ref-table th:nth-child(1),
.ref-table td:nth-child(1) {
  width: 28%;
}

.ref-table th:nth-child(2),
.ref-table td:nth-child(2) {
  width: 14%;
}

.ref-table th:nth-child(3),
.ref-table td:nth-child(3) {
  width: 58%;
}

.ref-table code {
  font-size: 0.84rem;
}

.ref-subtitle {
  margin: 20px 0 8px;
  font-size: 1rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 12px 0 0;
  padding: 14px 16px;
  list-style: none;
  border: 1px solid #dbdcdd;
  border-radius: 12px;
  background: #fafbfc;
}

.category-grid li {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #e4e8ed;
  border-radius: 8px;
  background: #fff;
  font-size: 0.86rem;
}

@media (max-width: 720px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .ref-table {
    table-layout: auto;
  }
}

/* prompts */
.prompt-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.prompt-item {
  background: #fafafa;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--cta);
  border-radius: 12px;
  padding: 12px 14px;
}

.prompt-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cta);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.prompt-text {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.prompt-tips {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.token-section ol {
  margin: 8px 0 0;
  padding-left: 18px;
}

.token-section li {
  margin-bottom: 6px;
  font-size: 0.94rem;
}

/* toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: white;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
