/* ===== TERMINAL PANEL ===== */
.terminal-panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 0;
  width: 100%;
  max-width: min(840px, 100%);
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(25px);
  background: unset;
}

.hero-figma-btn-wrap {
  padding-left: 0px;
  padding-right: 0px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: clamp(12px, 2.5vh, 28px);
}

.hero-figma-btn {
  flex-shrink: 0;
  align-self: flex-start;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  padding: 12px 16px;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.hero-figma-btn-outline {
  background: transparent;
  color: #fff;
  font-weight: 700;
  border: 1px solid var(--border);
}

.hero-figma-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

button.hero-figma-btn:disabled {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #333333;
  color: #888888;
  cursor: not-allowed;
  opacity: 1;
}

button.hero-figma-btn {
  cursor: pointer;
  font: inherit;
  text-align: left;
  appearance: none;
}

.hero-figma-btn__check {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: inherit;
  line-height: 0;
}

.hero-figma-btn__check svg {
  display: block;
}

button.hero-figma-btn:disabled .hero-figma-btn__icon {
  display: none;
}

button.hero-figma-btn:disabled .hero-figma-btn__check {
  display: flex;
}

.hero-figma-btn__cta-check {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  line-height: 0;
}

.hero-figma-btn__cta-check svg {
  display: block;
}

/* CTA：复制反馈态 — 与上方终端同宽，描边 + 实色底（等同黑底上约 10% 白）+ 25% 白字 */
#ctaCopyBtn.is-cta-prompt-sent {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  justify-content: flex-start;
  text-transform: none;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.25);
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.25);
}

#ctaCopyBtn.is-cta-prompt-sent .hero-figma-btn__label {
  flex: 1;
  min-width: 0;
  white-space: normal;
  line-height: 1.4;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.25);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.25);
}

#ctaCopyBtn.is-cta-prompt-sent .hero-figma-btn__arrow {
  display: none;
}

#ctaCopyBtn.is-cta-prompt-sent .hero-figma-btn__cta-check {
  display: flex;
  color: rgba(255, 255, 255, 0.45);
}

#ctaCopyBtn.is-cta-prompt-sent:hover {
  background: #1a1a1a;
  color: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.25);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.25);
}

.hero-figma-btn__label {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  width: fit-content;
}

.hero-figma-btn__arrow,
.hero-figma-btn__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: inherit;
  transition: transform 0.15s ease;
}

.hero-figma-btn__arrow svg,
.hero-figma-btn__icon svg {
  width: 20px;
  height: 20px;
  display: block;
  transform: translateX(-2px);
}

.hero-figma-btn:hover {
  color: #000;
  border: 1px solid var(--border);
  background: #f0f0f0;
}

.hero-figma-btn:hover .hero-figma-btn__arrow,
.hero-figma-btn:hover .hero-figma-btn__icon {
  transform: translateX(3px);
}

.hero-figma-btn:focus-visible {
  outline: 1px solid #666;
  outline-offset: 2px;
}

/* CLI QuickStart CTA: below hero terminal panel (not inside a column) */
.hero > .terminal-panel + .hero-figma-btn {
  margin-top: clamp(8px, 2.5vh, 28px);
  width: fit-content;
  min-width: min(200px, 100%);
  max-width: 100%;
  align-self: flex-start;
}

.terminal-view[hidden] {
  display: none !important;
}

/* Inverted polygon glow above terminal */
.terminal-glow {
  position: absolute;
  width: 264px;
  height: 51px;
  left: 50%;
  transform: translateX(-50%);
  top: -13px;
  pointer-events: none;
}

.terminal-titlebar {
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  padding: 12px;
  border-radius: 0;
}

.terminal-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 0;
  background: rgba(114,223,243,0.2);
}

.terminal-tabs {
  flex-shrink: 0;
  display: flex;
  border-top: 1px solid var(--border);
}

.tab {
  padding: 8px 24px;
  font-family: var(--font-code);
  font-size: var(--t-tab);
  color: rgba(0, 0, 0, 0.55);
  background: #fff;
  height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.tab.active {
  color: #000;
  background: #fff;
  border-top: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-bottom: none;
  font-weight: 600;
}

.tab-divider {
  width: 1px;
  height: 44px;
  background: rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid var(--border);
}

.tab-spacer {
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.terminal-views {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.terminal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.terminal-body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.terminal-body::-webkit-scrollbar-track {
  background: transparent;
}
.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.cta-terminal-wrap .terminal-panel .terminal-row-body {
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.cta-terminal-wrap .terminal-panel .terminal-row-body .terminal-cmd {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.cta-terminal-wrap .hero-figma-btn {
  align-self: center;
}

#ctaCopyBtn {
  margin-top: 0;
  margin-bottom: 0;
}

#ctaCopyBtn .hero-figma-btn__arrow,
#ctaCopyBtn:hover .hero-figma-btn__arrow {
  transform: none;
}

#ctaCopyBtn .hero-figma-btn__arrow svg {
  transform: none;
}

.cta-terminal-wrap .terminal-panel {
  height: fit-content;
  padding: 24px 16px;
  overflow: visible;
}

.cta-terminal-wrap {
  width: 100%;
  max-width: min(840px, 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.cta-terminal-wrap > .terminal-panel {
  align-self: stretch;
  width: 100%;
}

.cta-terminal-copy-btn {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 12px 20px;
  margin: 0;
  box-sizing: border-box;
  border-radius: 0;
  border: 1px solid var(--border);
  background: #fff;
  color: #000;
  font-family: var(--font-ui);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.06em;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.cta-terminal-copy-btn:hover {
  background: #f0f0f0;
}

.cta-terminal-copy-btn:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
}

.cta-terminal-copy-btn .cta-terminal-copy-btn__check {
  display: none;
  align-items: center;
}

.cta-terminal-copy-btn.is-copied {
  background: #e8e8e8;
}

.cta-terminal-copy-btn.is-copied .cta-terminal-copy-btn__label {
  display: none;
}

.cta-terminal-copy-btn.is-copied .cta-terminal-copy-btn__check {
  display: flex;
}

.cta-terminal-copy-btn.is-copied .copy-icon,
.cta-terminal-copy-btn.is-copied .copy-check {
  display: none !important;
}

.terminal-cmd-curl {
  word-break: break-all;
}

.terminal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-row-body {
  justify-content: flex-start;
  align-items: flex-start;
}

.terminal-row-actions {
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.terminal-row-body .terminal-cmd {
  width: 100%;
  margin: 0;
}

.terminal-label {
  font-family: var(--font-ui);
  font-size: 18px;
  color: rgba(100, 100, 100, 1);
  line-height: var(--t-prose-lh);
}

.copy-btn {
  box-sizing: border-box;
  width: 33px;
  height: 33px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.copy-btn:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.copy-btn.is-copied .copy-icon {
  display: none;
}

.copy-check {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--blue);
  line-height: 0;
}

.copy-check svg {
  width: 24px;
  height: 24px;
  display: block;
}

.copy-btn.is-copied .copy-check {
  display: flex;
}

.copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.15s ease;
}

.copy-btn:hover .copy-icon {
  color: rgba(255, 255, 255, 0.92);
}
.copy-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.terminal-cmd {
  font-family: var(--font-code);
  font-size: var(--t-terminal);
  color: #fff;
  line-height: var(--t-terminal-lh);
  letter-spacing: 0px;
}
.terminal-cmd a.link,
.terminal-cmd .link {
  color: var(--blue);
  text-decoration: none;
}
.terminal-cmd a.link:hover {
  text-decoration: underline;
}

/* SQL-ish highlighting (features terminal — dark editor style) */
.terminal-cmd.terminal-cmd-sql {
  font-size: 14px;
  line-height: 1.65;
  color: #fff;
  font-variant-ligatures: none;
}
.terminal-cmd.terminal-cmd-sql .sql-comment {
  display: block;
  margin-bottom: 4px;
  color: var(--code-sql-comment);
  font-style: italic;
}
.terminal-cmd.terminal-cmd-sql .sql-line {
  display: block;
  margin-bottom: 16px;
}
.terminal-cmd.terminal-cmd-sql .sql-line:last-child {
  margin-bottom: 0;
}
.terminal-cmd.terminal-cmd-sql .sql-kw {
  color: var(--blue);
  font-weight: 600;
}
.terminal-cmd.terminal-cmd-sql .sql-ident {
  color: #fff;
}
.terminal-cmd.terminal-cmd-sql .sql-string {
  color: #ce9178;
}
.terminal-cmd.terminal-cmd-sql .sql-lit {
  color: #4ec9b0;
  font-weight: 500;
}
.terminal-cmd.terminal-cmd-sql .sql-punct {
  color: rgba(160, 168, 190, 0.65);
}
.terminal-cmd.terminal-cmd-sql .sql-ellipsis {
  color: rgba(160, 168, 190, 0.85);
}

