/* ── Pricing ──────────────────────────────────────────────────
   Plan cards for the home page. The prices are drawn by /plans.js from
   /plans.json (the Ukrainian page) and /plans.en.json (the English one); both
   files are written by the deploy from clients-handler and are never kept in
   this repository. No file, or a file of the wrong shape — the block removes
   itself: an empty price list is worse than no price list.

   Every colour here is a token from style.css, so recolouring the site
   recolours this block with it. */
#plans[hidden]{display:none}
#plans .head{text-align:center}
#plans .head .lead{margin-inline:auto;max-width:58ch}

/* `display:flex` beats the `hidden` attribute, so a single plan kind left an
   empty 12px pill floating above the cards. */
.fh-tabs[hidden]{display:none}
.fh-tabs{display:flex;justify-content:center;gap:6px;margin:30px auto 0;
  background:var(--surface);border:1px solid var(--line);border-radius:999px;
  padding:5px;width:max-content;max-width:100%;flex-wrap:wrap}
.fh-tabs button{appearance:none;border:0;background:transparent;font:inherit;
  font-weight:700;font-size:14.5px;color:var(--muted);padding:10px 20px;
  border-radius:999px;cursor:pointer;transition:background .16s,color .16s}
.fh-tabs button:hover{color:var(--text)}
.fh-tabs button[aria-selected="true"]{background:var(--ink);color:var(--ink-text)}

.fh-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(252px,1fr));
  gap:18px;margin-top:32px;align-items:stretch}
/* One or two cards must not stretch into a banner across the whole width: a
   lone chain tariff is the usual case, and a 1100px wide card with a 1100px
   wide button does not read as a card at all. */
.fh-grid[data-count="1"]{grid-template-columns:minmax(252px,380px);justify-content:center}
.fh-grid[data-count="2"]{grid-template-columns:repeat(2,minmax(252px,380px));
  justify-content:center}
.fh-plan{position:relative;display:flex;flex-direction:column;
  background:var(--surface);border:1px solid var(--line);border-radius:16px;
  padding:30px 26px;
  transition:transform .18s,box-shadow .18s,border-color .18s}
.fh-plan:hover{transform:translateY(-3px);border-color:var(--accent-soft);
  box-shadow:var(--shadow)}
.fh-plan .nm{font-size:18px;font-weight:800;letter-spacing:-.01em;margin:0 0 6px}
.fh-plan .ds{margin:0 0 18px;color:var(--muted);font-size:14.5px;line-height:1.55}
.fh-plan .pr{font-family:Unbounded,Manrope,sans-serif;font-weight:700;
  font-size:clamp(25px,2.9vw,32px);letter-spacing:-.02em;line-height:1.05;
  font-variant-numeric:tabular-nums}
.fh-plan .pr span{font-family:Manrope,-apple-system,sans-serif;font-size:15px;
  font-weight:700;color:var(--muted);letter-spacing:0}
.fh-plan .sub{margin:9px 0 0;color:var(--muted);font-size:13.5px;line-height:1.45}
.fh-plan .note{display:inline-block;align-self:flex-start;margin-top:12px;
  background:var(--ground);border:1px solid var(--line);color:var(--text);
  font-weight:700;font-size:13px;padding:6px 12px;border-radius:999px}
.fh-plan ul{list-style:none;margin:22px 0 26px;padding:0;display:grid;gap:10px}
.fh-plan li{position:relative;padding-left:26px;font-size:14.5px;line-height:1.5}
/* The tick is drawn instead of being an inline SVG per card: the cards are
   built in JS, and a shape in CSS keeps the renderer free of markup. */
.fh-plan li::before{content:"";position:absolute;left:0;top:3px;
  width:17px;height:17px;border-radius:50%;background:var(--accent)}
.fh-plan li::after{content:"";position:absolute;left:5px;top:8px;width:6px;height:3px;
  border-left:2px solid var(--on-accent);border-bottom:2px solid var(--on-accent);
  transform:rotate(-45deg)}
.fh-plan .go{margin-top:auto;display:flex;align-items:center;justify-content:center;
  background:var(--accent);color:var(--on-accent);font-weight:800;font-size:15px;
  padding:13px 20px;border-radius:11px;transition:filter .16s}
.fh-plan .go:hover{filter:brightness(1.07)}

/* The highlighted card borrows the dark canvas of the summary band, so the
   page keeps the same two surfaces it had before this block appeared. */
.fh-plan.hot{background:var(--ink);border-color:var(--ink);color:var(--ink-text)}
.fh-plan.hot:hover{border-color:var(--accent-soft)}
.fh-plan.hot .pr{color:var(--accent-soft)}
.fh-plan.hot .ds,.fh-plan.hot .sub,.fh-plan.hot .pr span{color:var(--ink-muted)}
.fh-plan.hot .note{background:var(--ink-2);border-color:var(--ink-line);
  color:var(--accent-soft)}
.fh-badge{position:absolute;top:-11px;left:26px;background:var(--accent);
  color:var(--on-accent);font-weight:800;font-size:12px;letter-spacing:.02em;
  padding:5px 12px;border-radius:999px}

.fh-fx{text-align:center;margin:20px 0 0;color:var(--muted);font-size:13px}
/* The rate did not arrive — the paragraph stays empty, and an empty paragraph
   must not leave its margin behind. */
.fh-fx:empty{display:none}

@media(max-width:720px){
  .fh-grid,.fh-grid[data-count]{grid-template-columns:minmax(0,1fr);margin-top:26px}
  .fh-plan{padding:26px 22px}
  .fh-tabs button{padding:9px 14px;font-size:14px}
}
@media(max-width:560px){
  /* Two labels no longer fit on one line, and a pill wrapped around two rows of
     buttons reads as broken, so on narrow screens they stack. */
  .fh-tabs{width:100%;border-radius:14px;flex-direction:column;gap:4px}
  .fh-tabs button{width:100%}
}
