/* ip.platipomiru.com — визуальный язык platipomiru.com: Onest, брендовые синие, белые карточки на светло-голубом. */

@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url("/static/fonts/onest-400.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url("/static/fonts/onest-500.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url("/static/fonts/onest-600.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 700; font-display: swap; src: url("/static/fonts/onest-700.woff2") format("woff2"); }

:root {
  --bg: #f1f8fc;
  --card: #ffffff;
  --ink: #0f1d2b;
  --ink-2: #10161a;
  --muted: #8f99af;
  --muted-2: #636268;
  --line: #e2ebf3;
  --blue: #0c52eb;
  --blue-dark: #0a44c2;
  --sky: #59b6fa;
  --sky-bg: #e6f3fe;
  --green: #00a65e;
  --green-bg: #d9f2e6;
  --amber: #d97a00;
  --amber-bg: #fdf0d8;
  --red: #c10a46;
  --red-bg: #fbe1ea;
  --grey-bg: #eef2f6;
  --radius: 20px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(15, 29, 43, .04), 0 8px 24px rgba(15, 29, 43, .06);
  --font: "Onest", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
dl, dt, dd, ol { margin: 0; padding: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 10; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ── шапка ─────────────────────────────────────────────── */
.top {
  max-width: 760px; margin: 0 auto; padding: 22px 20px 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand img { display: block; height: 40px; width: auto; }
.top__eyebrow { color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: .02em; }

.page { max-width: 760px; margin: 0 auto; padding: 8px 20px 40px; }

/* ── интро ─────────────────────────────────────────────── */
.intro { padding: 18px 0 22px; }
.intro h1 { font-size: 30px; line-height: 1.12; font-weight: 700; margin-bottom: 10px; }
.intro p { color: var(--muted-2); font-size: 16px; max-width: 60ch; }

/* ── вердикт ───────────────────────────────────────────── */
.verdict {
  position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: start;
  background: var(--card); border-radius: var(--radius); padding: 24px 24px 24px 22px;
  box-shadow: var(--shadow); border: 1px solid transparent;
  transition: background-color .35s ease, border-color .35s ease;
}
.verdict__lamp {
  width: 56px; height: 56px; border-radius: 50%; margin-top: 2px;
  background: var(--grey-bg); position: relative;
  transition: background-color .35s ease;
}
.verdict__lamp::after {
  content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--muted);
  transition: background-color .35s ease, transform .35s ease;
}
.verdict__kicker { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.verdict__title { font-size: 28px; line-height: 1.1; font-weight: 700; margin-bottom: 8px; }
.verdict__text { color: var(--muted-2); max-width: 56ch; }

.verdict.is-checking .verdict__lamp::after { animation: pulse 1.2s ease-in-out infinite; }
.verdict.is-green { border-color: #bfe8d3; }
.verdict.is-green .verdict__lamp { background: var(--green-bg); }
.verdict.is-green .verdict__lamp::after { background: var(--green); }
.verdict.is-green .verdict__kicker { color: var(--green); }
.verdict.is-yellow { border-color: #f4d9a4; }
.verdict.is-yellow .verdict__lamp { background: var(--amber-bg); }
.verdict.is-yellow .verdict__lamp::after { background: var(--amber); }
.verdict.is-yellow .verdict__kicker { color: var(--amber); }
.verdict.is-red { border-color: #f0b8c9; }
.verdict.is-red .verdict__lamp { background: var(--red-bg); }
.verdict.is-red .verdict__lamp::after { background: var(--red); }
.verdict.is-red .verdict__kicker { color: var(--red); }
.verdict.is-error .verdict__lamp::after { background: var(--muted); }

/* оценка 0–100 */
.score { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 2px; --pct: 0; --c: var(--muted); }
.score__ring {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--pct) * 1%), var(--grey-bg) 0);
  transition: --pct .6s ease;
}
.score__ring::before { content: ""; position: absolute; width: 58px; height: 58px; border-radius: 50%; background: var(--card); }
.score__ring { position: relative; }
.score__num { position: relative; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.score__label { font-size: 12px; color: var(--muted); font-weight: 500; }
.verdict.is-green .score { --c: var(--green); }
.verdict.is-yellow .score { --c: var(--amber); }
.verdict.is-red .score { --c: var(--red); }
.verdict.is-checking .score__ring { animation: spin 1.4s linear infinite; background: conic-gradient(var(--sky) 25%, var(--grey-bg) 0); }
@keyframes spin { to { transform: rotate(360deg); } }
.verdict.is-checking .score__num { animation: none; }

@keyframes pulse { 0%, 100% { transform: scale(.7); opacity: .55; } 50% { transform: scale(1); opacity: 1; } }

/* ── замечания ─────────────────────────────────────────── */
.notes { margin-top: 14px; background: var(--card); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.notes__title { font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.notes__list { list-style: none; display: grid; gap: 12px; }
.note { display: grid; grid-template-columns: 10px 1fr; gap: 12px; align-items: start; }
.note::before { content: ""; width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.note.is-red::before { background: var(--red); }
.note.is-yellow::before { background: var(--amber); }
.note.is-info::before { background: var(--sky); }
.note h4 { margin: 0 0 2px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.note p { grid-column: 2; color: var(--muted-2); font-size: 15px; }

/* ── карточки данных ───────────────────────────────────── */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.card__title { font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.rows .row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: baseline; }
.rows .row:first-child { border-top: 0; }
.rows dt { color: var(--muted); font-size: 14px; font-weight: 500; }
.rows dd { font-weight: 500; overflow-wrap: anywhere; }
.rows dd .sub { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 2px; }
.rows dd.mono { font-size: 15px; }

/* скелетон */
.sk { position: relative; color: transparent !important; }
.sk::before {
  content: ""; position: absolute; left: 0; top: .2em; height: 1em; width: 60%; border-radius: 6px;
  background: linear-gradient(90deg, var(--grey-bg) 25%, #f6f8fb 50%, var(--grey-bg) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* индикаторы в строках */
.pill { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; border-radius: 100px; margin-left: 6px; vertical-align: 1px; }
.pill--ok { background: var(--green-bg); color: #087a48; }
.pill--warn { background: var(--amber-bg); color: #9a5600; }
.pill--bad { background: var(--red-bg); color: var(--red); }
.pill--info { background: var(--sky-bg); color: #1e5fa8; }
.pill--grey { background: var(--grey-bg); color: var(--muted-2); }
.flag { font-size: 18px; line-height: 1; margin-right: 6px; vertical-align: -2px; }

/* ── чек ────────────────────────────────────────────────── */
.receipt {
  position: relative; margin-top: 18px; background: var(--card); padding: 22px 24px 26px;
  border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow);
  /* зубчатый нижний край чека */
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat,
                radial-gradient(circle at 10px 0, transparent 7px, #000 7.5px) bottom / 20px 10px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat,
                radial-gradient(circle at 10px 0, transparent 7px, #000 7.5px) bottom / 20px 10px repeat-x;
  padding-bottom: 36px;
}
.receipt__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 2px dashed var(--line); }
.receipt__head h3 { font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.receipt__site { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.receipt__rows { display: grid; gap: 4px; padding: 14px 0 6px; }
.receipt__rows > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: baseline; }
.receipt__rows dt { color: var(--muted); font-size: 14px; }
.receipt__rows dd { font-weight: 600; }
#r-code { font-size: 22px; letter-spacing: .04em; color: var(--ink); }
.receipt__hint { color: var(--muted-2); font-size: 14px; margin: 6px 0 16px; max-width: 56ch; }
.receipt__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.receipt__copied { margin-top: 10px; color: var(--green); font-weight: 600; font-size: 14px; }

.btn {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px; border-radius: 100px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--primary:disabled { background: #b8c6e6; cursor: default; }
.btn--ghost { background: var(--sky-bg); color: var(--blue); }
.btn--ghost:hover { background: #d6eafd; }

/* ── faq / футер ───────────────────────────────────────── */
.faq { margin-top: 26px; display: grid; gap: 8px; }
.faq details { background: transparent; border-top: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; }
.faq details[open] summary::after { content: "–"; }
.faq p, .faq ol { color: var(--muted-2); font-size: 15px; padding-bottom: 12px; }
.faq ol { padding-left: 20px; display: grid; gap: 6px; }
.faq code { font-family: var(--mono); font-size: 13px; background: var(--grey-bg); padding: 1px 6px; border-radius: 6px; }

.foot { max-width: 760px; margin: 0 auto; padding: 0 20px 36px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.foot__ver { font-family: var(--mono); }

@media (max-width: 480px) {
  .intro h1 { font-size: 26px; }
  .verdict { grid-template-columns: 44px 1fr auto; gap: 14px; padding: 20px 18px; }
  .score__ring { width: 60px; height: 60px; }
  .score__ring::before { width: 48px; height: 48px; }
  .score__num { font-size: 18px; }
  .verdict__lamp { width: 44px; height: 44px; }
  .verdict__lamp::after { inset: 12px; }
  .verdict__title { font-size: 24px; }
  .card, .notes, .receipt { padding-left: 18px; padding-right: 18px; }
  .rows .row, .receipt__rows > div { grid-template-columns: 96px 1fr; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
