/* ============================================================
   外链过渡页 · leave
   目标站点品牌色通过 CSS 变量注入（--brand / --brand-ink），
   由 leave.js 按 slug 映射，视觉基调仍跟随本站双主题。
   ============================================================ */

.leave {
  min-height: calc(100vh - var(--header-h) - 120px);
  display: grid;
  place-items: center;
  padding: 48px 20px 72px;
}

.leave-card {
  --brand: var(--accent);
  --brand-ink: var(--accent-ink);
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-float);
  padding: 34px 34px 26px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  animation: leaveIn 0.34s var(--ease-out) both;
}

/* 顶部一道品牌色渐隐条，是「目标站点」的唯一视觉暗示 */
.leave-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), transparent 78%);
  opacity: 0.85;
}

@keyframes leaveIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.leave-kicker {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 20px;
}

.leave-target {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* 目标站点图标：直接显示 44×44，不再外套容器。
   仅首字母兜底（.letter）才需要色块背景与居中。 */
.leave-fav {
  flex: none;
  width: 44px;
  height: 44px;
  display: block;
}
.leave-fav img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}
/* 同 .fav.plate：按 tone 分派，tone 与当前主题匹配时才显示衬底 */
.leave-fav.plate {
  background: var(--icon-plate);
  border: 1px solid var(--border);
  border-radius: 10px;
}
html[data-theme="dark"] .leave-fav.plate-l,
html[data-theme="light"] .leave-fav.plate-d {
  background: none;
  border-color: transparent;
}
.leave-fav.letter {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  font: 600 20px/1 var(--font-mono);
  color: var(--brand);
}

.leave-target-meta { min-width: 0; }

.leave-name {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 3px;
  color: var(--text);
  word-break: break-word;
}

.leave-host {
  font-size: 12.5px;
  color: var(--brand);
  margin: 0;
  word-break: break-all;
}

.leave-note {
  font-size: 14px;
  line-height: 1.72;
  color: var(--text-2);
  margin: 20px 0 26px;
}

.leave-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-leave {
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.16s var(--ease-out), background-color 0.16s, border-color 0.16s, color 0.16s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-leave:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
  border: 1px solid transparent;
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.leave-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-3);
  margin: 22px 0 0;
}
.leave-dots { opacity: 0.5; }

/* 极窄屏：按钮占满一行，避免挤压 */
@media (max-width: 420px) {
  .leave-card { padding: 26px 20px 20px; }
  .leave-actions { flex-direction: column; }
  .btn-leave { justify-content: center; width: 100%; }
}

/* 无 JS 时按钮不出现，页面仍可读 */
.leave.no-js .leave-actions { display: none; }