:root{
  --blue:#2e6ecb;
  --navy:#16375c;
  --ink:#2c3f57;
  --muted:#8b929d;
  --line:#e4e7eb;
  --green:#2ba24c;
  --cta:#153a5e;
  --serif:"Source Serif 4",Georgia,"Times New Roman",serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  --col:700px;
  --rail:56px;
  --gap:26px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;min-width:320px;background:#fff;color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}
img{max-width:100%}
a{color:inherit;-webkit-tap-highlight-color:transparent}
button{-webkit-tap-highlight-color:transparent}

/* ── Header ─────────────────────────────────────────── */
.site-header{position:sticky;top:0;z-index:60;background:#fff;border-bottom:1px solid #eef0f3}
.site-header__inner{display:flex;align-items:center;gap:10px;height:52px;padding:0 18px}
.brand{display:flex;align-items:center;flex:0 0 auto}
.brand img{display:block;height:26px;width:auto}
.main-nav{display:flex;align-items:center;gap:2px;margin-left:8px;min-width:0}
.main-nav a{padding:6px 9px;border-radius:6px;color:#41597a;font-size:12.5px;font-weight:700;line-height:1;letter-spacing:.2px;text-transform:uppercase;text-decoration:none;white-space:nowrap}
.main-nav__pill{background:var(--blue);color:#fff}
.header-tools{display:flex;align-items:center;gap:4px;margin-left:auto}
.tool{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;color:var(--blue);text-decoration:none}
.tool img{display:block;width:21px;height:21px;object-fit:contain}
.tool svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tool--burger{color:#16233a}
.theme-toggle{display:flex;align-items:center;gap:3px;height:28px;margin:0 2px;padding:0 8px;border-radius:999px;background:#d2e1f4;color:#2b5f9e;text-decoration:none}
.theme-toggle svg{display:block;width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle svg:first-child{fill:currentColor;stroke:none}

/* ── Breaking bar ───────────────────────────────────── */
.breaking{padding:36px 16px 0}
.breaking__bar{display:flex;align-items:center;gap:14px;width:min(972px,100%);margin:0 auto;padding:9px 14px;border:1px solid var(--line);border-radius:7px;text-decoration:none;transition:border-color .18s ease}
.breaking__tag{flex:0 0 auto;padding:3px 6px;border-radius:3px;background:#f1f3f6;color:#8d949e;font-size:9.5px;font-weight:700;line-height:1;letter-spacing:.5px;text-transform:uppercase}
.breaking__time{flex:0 0 auto;color:#7e8792;font-size:12.5px;font-weight:600}
.breaking__title{color:#17233a;font-size:13.5px;font-weight:700;line-height:1.3}

/* ── Article layout ─────────────────────────────────── */
.article{padding-bottom:48px}
.article__grid{
  display:grid;
  width:min(var(--col),calc(100% - 32px));
  margin:0 auto;
  grid-template-columns:var(--rail) minmax(0,1fr);
  column-gap:var(--gap);
  grid-template-areas:". head" "rail body";
}
.article__head{grid-area:head;padding:46px 0 0}
.badges{display:flex;flex-wrap:wrap;gap:6px}
.badge{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:4px;font-size:10.5px;font-weight:700;line-height:1;letter-spacing:.4px;text-transform:uppercase}
.badge--section{background:var(--blue);color:#fff}
.badge--live{background:#e8393e;color:#fff}
.badge--live .dot{width:6px;height:6px;border-radius:50%;background:#fff}
.badge--dev{background:#f7c948;color:#3f3007}
.badge--dev .dots{display:flex;gap:2px}
.badge--dev .dots b{width:4px;height:4px;border-radius:50%;background:#fff}
.meta{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:16px;color:#8f959f;font-size:12.5px}
.meta__sep{color:#c3c8ce}
.meta__item{display:inline-flex;align-items:center;gap:5px;text-decoration:none}
.meta__item svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.meta__link{border-bottom:1px solid #c9ced5}

/* ── Left rail ──────────────────────────────────────── */
.rail{grid-area:rail;align-self:start;position:sticky;top:70px;padding-top:6px}
.rail__brand{display:block}
.rail__brand img{display:block;width:34px;height:auto}
.rail__author{margin-top:14px;color:#9aa0a9;font-size:9.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase}
.rail__author a{display:block;margin-top:3px;color:#4b5563;text-decoration:underline}
.rail__share{margin-top:18px}
.rail__share>span{display:block;margin-bottom:9px;color:#9aa0a9;font-size:9.5px;font-weight:600}
.rail__share a{display:block;margin-bottom:7px;color:#5b6672}
.rail__share svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.rail__share svg .fill{fill:currentColor;stroke:none}

/* ── Article body ───────────────────────────────────── */
.article__body{grid-area:body;min-width:0;padding-top:6px}
.breadcrumb{display:flex;align-items:center;gap:6px;margin-bottom:16px;color:#828c98;font-size:12.5px}
.breadcrumb a{text-decoration:none}
.article__body h1{margin:0 0 18px;font-family:var(--serif);font-size:30px;font-weight:700;line-height:1.3;letter-spacing:-.2px;color:var(--navy)}
.lead{margin:0 0 24px;font-family:var(--serif);font-size:17px;font-weight:700;line-height:1.45;color:var(--navy)}
.copy{max-width:508px}
.article-figure{margin:0 0 22px}
.article-figure img{display:block;width:100%;height:auto}
.copy p{margin:0 0 18px;font-family:var(--serif);font-size:16px;line-height:1.62;color:var(--ink)}
.copy p b{font-weight:700;color:var(--navy)}
.inline-link{color:var(--blue);font-weight:600;text-decoration:none}
.copy blockquote{margin:0 0 18px 56px;font-family:var(--serif);font-size:16px;line-height:1.62;color:var(--ink)}
.sub{margin:26px 0 16px;font-family:var(--serif);font-size:16.5px;font-weight:700;line-height:1.4;color:var(--navy)}
.results-title{margin:28px 0 18px;font-family:var(--serif);font-size:27px;font-weight:700;line-height:1.2;color:var(--navy)}
.results,.steps-list{margin:0 0 18px;padding-left:22px;font-family:var(--serif);font-size:16px;line-height:1.62;color:var(--ink)}
.results li,.steps-list li{margin-bottom:6px;padding-left:4px}
.results li b,.steps-list li b{font-weight:700;color:var(--navy)}
.results{list-style:disc}
.steps-list{list-style:decimal}

.cta{
  display:block;margin:30px 0 0;padding:25px 22px;
  background:var(--cta);border-radius:2px;
  color:#fff;font-size:19px;font-weight:700;line-height:1.28;letter-spacing:.4px;
  text-align:center;text-transform:uppercase;text-decoration:none;
  -webkit-user-select:none;user-select:none;
  transition:background .18s ease;
}
.cta:active{background:#0f2c48}

/* ── Comments ───────────────────────────────────────── */
.comments{width:min(var(--col),calc(100% - 32px));margin:42px auto 0;padding-left:calc(var(--rail) + var(--gap))}
.comments__title{display:flex;align-items:center;gap:9px;margin:0 0 16px;color:var(--navy);font-size:15px;font-weight:700;letter-spacing:.4px;text-transform:uppercase}
.comments__title svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.comments__title b{padding:2px 9px;border-radius:999px;background:var(--blue);color:#fff;font-size:12.5px;font-weight:700}

.notice{padding:16px 18px;border-radius:9px;background:#f1f2f4}
.notice p{margin:0 0 12px;color:#4d5763;font-size:13px;line-height:1.45}
.notice p b{color:#28323e}
.notice__btn{display:inline-block;padding:9px 14px;border:1px solid #d5d9de;border-radius:5px;background:#fff;color:#3d4753;font-size:11px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;text-decoration:none;transition:border-color .18s ease,color .18s ease}

.login-box{display:flex;align-items:flex-start;gap:14px;margin-top:14px;padding:16px 18px;border-radius:9px;background:#eaeff6}
.avatar{flex:0 0 40px;width:40px;height:40px;border-radius:50%;background:#e4e7ec;object-fit:cover}
.login-box__field{display:flex;align-items:center;justify-content:space-between;gap:14px;flex:1;min-width:0;min-height:64px;padding:12px 14px;border-radius:7px;background:#fff}
.login-box__field>span{color:#7d8792;font-size:13.5px}
.login-box__btn{flex:0 0 auto;padding:9px 15px;border-radius:5px;background:var(--blue);color:#fff;font-size:12.5px;font-weight:600;text-decoration:none;transition:background .18s ease}

.comments__list{margin-top:22px}
.comment{display:flex;gap:14px;padding:16px 0}
.comment+.comment{border-top:1px solid #eef0f3}
.comment--reply{margin-left:36px;border-top:1px solid #eef0f3}
.comment__body{flex:1;min-width:0}
.comment__head{display:flex;align-items:center;gap:8px;color:#8b929d;font-size:12.5px}
.comment__head strong{color:#1f2b3b;font-size:14px;font-weight:700}
.comment__head i{font-style:normal;color:#c3c8ce}
.comment__text{margin:9px 0 0;color:#3b4757;font-size:14px;line-height:1.55}
.comment__actions{display:flex;align-items:center;gap:8px;margin-top:12px;color:#8b929d;font-size:12.5px}
.comment__reply{display:inline-flex;align-items:center;gap:7px;text-decoration:none}
.comment__reply svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.comment__score{margin-left:auto;font-size:12.5px;font-weight:700;color:#9aa0a9}
.comment__score.is-positive{color:var(--green)}
.comment__vote{display:inline-flex;align-items:center;gap:5px}
.comment__vote svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.comment__vote--down svg{transform:rotate(180deg)}
.comment__score+.comment__vote{margin-left:2px}
.comment__reply+.comment__vote{margin-left:auto}

.load-more{display:block;margin-top:22px;padding:14px;border-radius:5px;background:#ececec;color:#2c3542;font-size:13.5px;text-align:center;text-decoration:none;transition:background .18s ease}

/* ── Footer ─────────────────────────────────────────── */
.site-footer{margin-top:48px;padding:36px 16px 44px;text-align:center}
.site-footer__brand{display:flex;align-items:center;justify-content:center;gap:14px}
.site-footer__brand img{display:block;height:26px;width:auto;opacity:.75}
.site-footer__divider{width:1px;height:22px;background:#d7dbe0}
.site-footer__social{color:#8e959e}
.site-footer__social svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.site-footer__social svg .fill{fill:currentColor;stroke:none}
.site-footer__links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;max-width:1240px;margin:28px auto 0}
.site-footer__links--second{margin-top:10px}
.site-footer__links a{color:#5c6672;font-size:10.5px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;text-decoration:none}
.site-footer__legal{margin-top:28px;color:#9aa0a9;font-size:12.5px;line-height:1.6}
.site-footer__legal p{margin:0}

.to-top{position:fixed;right:22px;bottom:22px;z-index:70;display:grid;place-items:center;width:42px;height:42px;padding:0;border:0;border-radius:50%;background:#dce6f3;color:#3f6ea8;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .2s ease,background .18s ease}
.to-top.is-visible{opacity:1;pointer-events:auto}
.to-top svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* ── Hover: только для мыши.
      На тач-экранах :hover «залипает» после тапа — поэтому всё здесь. ─── */
@media (hover:hover) and (pointer:fine){
  .main-nav a:hover{background:#f2f5f9}
  .main-nav__pill:hover{background:#2560b6}
  .tool:hover{background:#f2f5f9}
  .breaking__bar:hover{border-color:#c9d2dd}
  .meta__link:hover{color:var(--blue);border-color:var(--blue)}
  .breadcrumb a:hover,.rail__author a:hover,.rail__share a:hover,
  .site-footer__links a:hover,.site-footer__social:hover,
  .comment__reply:hover{color:var(--blue)}
  .inline-link:hover{text-decoration:underline}
  .cta:hover{background:#1d4d7a}
  .notice__btn:hover{border-color:var(--blue);color:var(--blue)}
  .login-box__btn:hover{background:#2560b6}
  .load-more:hover{background:#e2e2e2}
  .to-top:hover{background:#cbdcf0}
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width:1180px){
  .site-header__inner{gap:6px}
  .main-nav a{padding:6px 7px;font-size:11.5px}
}
/* Освобождаем место в шапке: убираем развлекательные иконки,
   чтобы навигация дожила до планшета. */
@media (max-width:1080px){
  .header-tools .tool--extra{display:none}
}
@media (max-width:860px){
  .main-nav{display:none}
  .site-header__inner{gap:12px}
}
@media (max-width:760px){
  .breaking{padding-top:22px}
  .breaking__bar{gap:10px}
  .breaking__title{font-size:12.5px}

  .article__grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "body" "rail";row-gap:0}
  .article__head{padding-top:26px}
  .article__body{padding-top:16px}
  .article__body h1{font-size:25px}
  .lead{font-size:16px}
  .copy{max-width:none}
  .copy blockquote{margin-left:24px}
  .results-title{font-size:23px}
  .cta{padding:20px 16px;font-size:16px}

  .rail{position:static;margin-top:30px;padding-top:20px;border-top:1px solid var(--line)}
  .rail__brand{display:none}
  .rail__author{margin-top:0}
  .rail__author a{display:inline-block;margin:0 10px 0 0}
  .rail__share{display:flex;align-items:center;gap:12px;margin-top:14px}
  .rail__share>span{margin-bottom:0}
  .rail__share a{margin-bottom:0}

  .comments{padding-left:0;margin-top:34px}
  .login-box{gap:10px;padding:12px}
  .login-box__field{flex-direction:column;align-items:flex-start;gap:10px}
  .comment--reply{margin-left:20px}
  .site-footer__links{gap:8px 14px}
}
@media (max-width:480px){
  .site-header__inner{padding:0 12px;gap:8px}
  .brand img{height:23px}
  .breaking{padding-left:12px;padding-right:12px}
  .article__grid,.comments{width:calc(100% - 24px)}
  .article__body h1{font-size:22px}
  .lead{font-size:15.5px}
  .copy p,.results,.steps-list,.copy blockquote{font-size:15.5px}
  .cta{padding:18px 14px;font-size:15px;letter-spacing:.2px}
  .comment{gap:11px}
  .avatar{flex-basis:34px;width:34px;height:34px}
  .comment--reply{margin-left:14px}
  .to-top{right:14px;bottom:14px}
}
@media (max-width:360px){
  .theme-toggle{display:none}
  .article__body h1{font-size:20px}
  .cta{font-size:13.5px}
}
