/* Plan cards + inline editor */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 17px 17px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.plan-card:hover { transform: translateY(-2px); box-shadow: 0 26px 50px -38px rgba(10, 34, 76, .5), var(--shadow-sm); }
.plan-card.is-featured {
  border-color: var(--accent-2);
  box-shadow: 0 30px 60px -42px var(--accent), 0 0 0 3px var(--accent-soft);
}
.plan-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 26px 50px -38px var(--accent);
}
.plan-badge {
  position: absolute;
  top: -11px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb020, #f97316);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  box-shadow: 0 10px 22px -12px rgba(249, 115, 22, .95);
}
.plan-badge .ico { width: 11px; height: 11px; }

.accent-blue { --accent: #1b5cff; --accent-2: #7ba4ff; --accent-soft: #eaf1ff; --accent-ink: #123a99; }
.accent-violet { --accent: #7c3aed; --accent-2: #b79bfb; --accent-soft: #f2ecff; --accent-ink: #4c1d95; }
.accent-navy { --accent: #12306b; --accent-2: #6d8bc4; --accent-soft: #e9eefb; --accent-ink: #0b1f47; }
.accent-teal { --accent: #0f8a80; --accent-2: #7bd6cc; --accent-soft: #e6f8f5; --accent-ink: #0a5f58; }
.accent-emerald { --accent: #0f9d58; --accent-2: #7ddca8; --accent-soft: #e8f8ef; --accent-ink: #0a6b3d; }
.accent-gold { --accent: #b7791f; --accent-2: #f0c26a; --accent-soft: #fdf6e3; --accent-ink: #7a4d0b; }

.plan-head { display: flex; gap: 11px; align-items: flex-start; }
.plan-icon {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, #fff);
}
.plan-icon .ico { width: 19px; height: 19px; }
.plan-title h3 { font-size: 17.5px; font-weight: 800; letter-spacing: -.025em; }
.plan-title p { margin-top: 3px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }

.plan-pricing { margin-top: 16px; }
.plan-price { display: flex; align-items: baseline; gap: 3px; color: var(--ink); }
.plan-price .cur { font-size: 14px; font-weight: 700; color: #43536c; }
.plan-price .amount {
  font-size: clamp(22px, 2vw, 27px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.05;
}
.plan-price .per { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.plan-card.is-nego .plan-price .cur,
.plan-card.is-nego .plan-price .per { display: none; }
.plan-card.is-nego .plan-price .amount { color: var(--accent); font-size: 24px; }
.plan-price-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: #6b7d96;
}
.plan-price-note .dot { width: 3px; height: 3px; border-radius: 50%; background: #b8c4d5; }

.plan-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 8px;
  margin-top: 14px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8fafe;
}
.plan-metrics.metrics-stack { grid-template-columns: 1fr; gap: 8px; }
.metric span {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: #74849b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric strong {
  display: block;
  margin-top: 1px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #11223b;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.plan-ai-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  font-size: 10.5px;
  font-weight: 600;
  color: #6b7d96;
}
.plan-ai-type strong { font-size: 11px; color: var(--accent-ink); }

.plan-features { display: grid; gap: 7px; margin-top: 14px; }
.plan-features li { display: flex; gap: 7px; font-size: 11.5px; line-height: 1.42; color: #3d4d65; }
.plan-features .ico { width: 14px; height: 14px; margin-top: 1px; color: var(--accent); }
.plan-features li.is-off { color: #93a0b3; }
.plan-features li.is-off .ico { color: #b8c3d2; }

.plan-small-note {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 8px 9px;
  border-radius: 9px;
  background: #f7f9fd;
  border: 1px dashed #e2e9f3;
  font-size: 10.5px;
  line-height: 1.45;
  color: #6d7d94;
}
.plan-small-note .ico { width: 13px; height: 13px; margin-top: 1px; flex: none; color: #93a4ba; }

.plan-actions { display: grid; gap: 6px; margin-top: auto; padding-top: 16px; }
.btn-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border: 1.5px solid #e0e8f5;
  border-radius: 10px;
  background: #f1f5fc;
  color: #1a2c47;
  font-size: 12.5px;
  font-weight: 800;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn-select:hover { background: #e9f0fb; }
.btn-select .select-check { display: none; }
.btn-select .select-check .ico { width: 14px; height: 14px; }
.btn-select.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 12px 22px -15px var(--accent);
}
.btn-select.is-selected .select-check { display: inline-flex; }
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px;
  font-size: 11.5px;
  font-weight: 700;
  color: #5c6e86;
}
.btn-link:hover { color: var(--accent-ink); }
.btn-link .ico { width: 13px; height: 13px; }

/* ---------- editor ---------- */
.plan-editor { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #dde6f2; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.editor-head strong { font-size: 12px; }
.editor-reset {
  font-size: 10.5px;
  font-weight: 700;
  color: #67788f;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #c3cfdf;
}
.editor-reset:hover { color: #b42318; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span:first-child {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6c7d94;
}
.field input,
.field select {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  color: #11223b;
  font-size: 12px;
  font-weight: 600;
}
.field input:focus,
.field select:focus {
  outline: 2px solid #d3e2ff;
  border-color: #a8c4f5;
}
.field-full { grid-column: 1 / -1; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.input-wrap {
  display: flex;
  align-items: center;
  padding-left: 8px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}
.input-wrap:focus-within { outline: 2px solid #d3e2ff; border-color: #a8c4f5; }
.input-wrap .prefix { font-size: 11px; font-weight: 700; color: #7c8ba1; }
.input-wrap input { border: 0; padding-left: 5px; }
.input-wrap input:focus { outline: none; }
.field-full .input-wrap input { font-size: 13px; font-weight: 700; }
.editor-hint {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  font-size: 10px;
  line-height: 1.5;
  color: #7b8ba1;
}
.editor-hint .ico { width: 13px; height: 13px; margin-top: 1px; flex: none; color: #93a4ba; }

@media (max-width: 1180px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .plan-grid { grid-template-columns: 1fr; }
  .plan-price .amount { font-size: 27px; }
}
