/*
 * The plan cards (includes/pricing-table.php). One stylesheet for their three places: the home page, /pricing,
 * and My Plan inside the software. It lives on its own so the software, which does not load public.css, draws
 * the same cards; the partial links it itself.
 *
 * 1 Oct 2026: cards with the struck price, the discount and a period switch on a tier with more than one period
 * (the owner: "mast aur achha lagna chahiye, attractive dekhne me"). The class names are new (np-) so the
 * website's hover rules for its older cards (.pc-card in public-v3.css) do not reach them.
 *
 * Colours are tokens on .np so the software's dark theme can answer them in one place.
 */
.np {
  --np-bg: #fff; --np-line: #e3e8f0; --np-ink: #0b1b3f; --np-body: #334155; --np-muted: #64748b;
  --np-soft: #f1f4f9; --np-navy: #0f2557; --np-navy2: #0b1b3f; --np-orange: #f06a1c; --np-orange2: #ff8a3d;
  --np-green: #15803d; --np-green-bg: #e7f8ee; --np-strike: #94a3b8;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch;
  font-variant-numeric: tabular-nums;
}
.np-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1020px; margin: 0 auto; }
.np-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 700px; margin: 0 auto; }
.np-n1 { grid-template-columns: minmax(0, 380px); justify-content: center; }
.np.np-app.np-n3 { margin: 0; max-width: none; }
[data-theme="dark"] .np {
  --np-bg: var(--surface, #111827); --np-line: #334155; --np-ink: #f1f5f9; --np-body: #cbd5e1; --np-muted: #94a3b8;
  --np-soft: rgba(255, 255, 255, .06); --np-green-bg: rgba(34, 197, 94, .14); --np-green: #4ade80;
}

.np-card {
  position: relative; display: flex; flex-direction: column;
  padding: 26px 22px 22px; border: 1px solid var(--np-line); border-radius: 16px;
  background: var(--np-bg); color: var(--np-body);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -18px rgba(15, 23, 42, .25);
  transition: transform .18s ease, box-shadow .18s ease;
}
.np-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 22px 40px -20px rgba(15, 23, 42, .35); }

.np-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.np-name { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--np-ink); }
.np-off {
  flex: none; padding: 4px 10px; border-radius: 999px;
  background: var(--np-green-bg); color: var(--np-green);
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.np-period { margin: 4px 0 16px; font-size: 13.5px; color: var(--np-muted); }

/* the period switch, on a tier sold for more than one period */
.np-yr { display: inline-flex; align-self: flex-start; gap: 2px; margin: 10px 0 14px; padding: 3px; border-radius: 10px; background: var(--np-soft); }
.np-yr button {
  padding: 6px 11px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--np-muted); white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.np-yr button[aria-pressed="true"] { background: #fff; color: var(--np-navy); box-shadow: 0 1px 3px rgba(15, 23, 42, .18); }

.np-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0; color: var(--np-ink); }
.np-amt { font-size: clamp(34px, 3.2vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.np-was { font-size: 17px; font-weight: 500; color: var(--np-strike); text-decoration: line-through; text-decoration-color: #ef4444; text-decoration-thickness: 2px; }
.np-month { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 8px 0 18px; font-size: 13.5px; color: var(--np-body); }
.np-save { font-weight: 700; color: var(--np-green); }

.np-points { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 9px; flex: 1; align-content: start; }
.np-points li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.45; color: var(--np-body); }
.np-points li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--np-green-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12.5 10 17 19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.np-go {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; margin: 0;
  border: 0; border-radius: 12px; background: var(--np-navy); color: #fff; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none;
  transition: filter .15s ease, transform .15s ease;
}
.np-go:hover { color: #fff; text-decoration: none; filter: brightness(1.15); }
.np-go:active { transform: translateY(1px); }
.np-you { display: block; margin-top: 9px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--np-green); }
.np-card.is-mine { border: 2px solid var(--np-orange); padding: 25px 21px 21px; }

/* the free trial: lighter, it costs nothing */
.np-free { background: var(--np-soft); box-shadow: none; }
.np-free .np-go { background: #fff; color: var(--np-navy); border: 1.5px solid var(--np-navy); }
.np-free .np-go:hover { background: var(--np-navy); color: #fff; filter: none; }

/* the tier that costs least a month */
.np-card.is-best {
  border-color: transparent; color: #d6dff0;
  background: linear-gradient(160deg, #17306b 0%, var(--np-navy) 45%, var(--np-navy2) 100%);
  box-shadow: 0 24px 50px -24px rgba(11, 27, 63, .75);
}
.np-card.is-best.is-mine { border-color: var(--np-orange); }
.np-card.is-best .np-name, .np-card.is-best .np-price { color: #fff; }
.np-card.is-best .np-period, .np-card.is-best .np-month, .np-card.is-best .np-points li { color: #d6dff0; }
.np-card.is-best .np-was { color: #8ea0c4; }
.np-card.is-best .np-off { background: #22c55e; color: #fff; }
.np-card.is-best .np-save { color: #4ade80; }
.np-card.is-best .np-points li::before { background-color: rgba(255, 255, 255, .14);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12.5 10 17 19 7.5'/%3E%3C/svg%3E"); }
.np-card.is-best .np-yr { background: rgba(255, 255, 255, .1); }
.np-card.is-best .np-yr button { color: #c5d1ea; }
.np-card.is-best .np-yr button[aria-pressed="true"] { background: #fff; color: var(--np-navy); }
.np-card.is-best .np-go { background: linear-gradient(180deg, var(--np-orange2), var(--np-orange)); box-shadow: 0 12px 24px -12px rgba(240, 106, 28, .8); }
.np-card.is-best .np-you { color: #4ade80; }
.np-tag {
  position: absolute; top: -12px; left: 22px; padding: 4px 12px; border-radius: 999px;
  background: linear-gradient(180deg, var(--np-orange2), var(--np-orange)); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 6px 14px -6px rgba(240, 106, 28, .8);
}

/* what every paid plan has, said once under the cards */
.np-incl { margin-top: 30px; }
.np-incl h3 { margin: 0 0 14px; font-size: 16px; font-weight: 600; color: var(--np-ink, #0b1b3f); }
.np-incl ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 26px; }
.np-incl li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.45; color: var(--np-body, #334155); }
.np-incl li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%;
  background: #e7f8ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12.5 10 17 19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.np-incl p { margin: 0; font-size: 13.5px; color: var(--np-muted, #64748b); }
[data-theme="dark"] .np-incl h3 { color: #f1f5f9; }
[data-theme="dark"] .np-incl li { color: #cbd5e1; }

@media (max-width: 1080px) { .np, .np-n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .np-incl ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .np, .np-n3, .np-n2 { grid-template-columns: 1fr; gap: 24px; } .np-incl ul { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .np-card, .np-go, .np-yr button { transition: none; } .np-card:hover { transform: none; } }
