 :root{
      
      --dark: #2f3847;      
      --dark2:#242c39;
      --accent:#8b0f1f;

      --bg: #f2f3f5;        
      --text:#1a2233;
      --muted: rgba(26,34,51,.65);
      --line: rgba(0,0,0,.10);

      --sheet:#ffffff;
      --shadow: 0 18px 55px rgba(0,0,0,.14);

      --r: 14px;
      --container: 1180px;
    }

    *{ box-sizing: border-box; }
    html,body{ height:100%; }
    body{
      margin:0;
      font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      color: var(--text);
      background: var(--bg);
    }

    .container{
      width: min(var(--container), calc(100% - 32px));
      margin: 0 auto;
    }

  
    .topbar{
      background: #fff;
      border-bottom: 1px solid var(--line);
    }

    .topbar__row{
      display: grid;
      grid-template-columns: 240px 1fr 360px;
      gap: 16px;
      align-items: center;
      padding: 14px 0;
    }

    .brand{
      display:flex;
      align-items:center;
      gap:12px;
      text-decoration:none;
      color: var(--text);
      min-width: 220px;
    }
    .brand img{
      height: 46px;
      width:auto;
      display:block;
    }
    .brand__fallback{
      font-weight: 900;
      letter-spacing: -0.3px;
      display:none;
    }

    .search{
      display:flex;
      align-items:center;
      gap: 10px;
    }
    .search input{
      width: 100%;
      height: 44px;
      border-radius: 10px;
      border: 1px solid rgba(0,0,0,.12);
      background: #fff;
      padding: 0 14px;
      font-size: 14px;
      outline: none;
    }
    .search input:focus{
      border-color: rgba(139,15,31,.35);
      box-shadow: 0 0 0 4px rgba(139,15,31,.10);
    }

    .top-actions{
      display:flex;
      align-items:center;
      justify-content:flex-end;
      gap: 10px;
      flex-wrap: wrap;
    }

    .pill{
      display:inline-flex;
      align-items:center;
      gap: 8px;
      height: 44px;
      padding: 0 12px;
      border-radius: 999px;
      border: 1px solid rgba(0,0,0,.10);
      background: rgba(0,0,0,.02);
      color: var(--text);
      text-decoration:none;
      font-weight: 800;
      font-size: 13px;
    }

    .btn{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      text-decoration:none;
      height: 44px;
      padding: 0 18px;
      border-radius: 8px;
      border: 1px solid rgba(0,0,0,.10);
      font-weight: 900;
      font-size: 14px;
      cursor:pointer;
      user-select:none;
      white-space: nowrap;
    }
    .btn--accent{
      background: var(--accent);
      border-color: transparent;
      color: #fff;
      box-shadow: 0 14px 30px rgba(139,15,31,.22);
    }
    .btn--accent:hover{ filter: brightness(1.03); }

  
    .navbar{
      background: var(--dark);
      border-bottom: 1px solid rgba(255,255,255,.08);
    }
    .navbar__row{
      position: relative;
      display:flex;
      align-items:center;
      justify-content: space-between;
      gap: 14px;
      padding: 10px 0;
    }

    .nav{
      display:flex;
      gap: 18px;
      align-items:center;
      flex-wrap: wrap;
    }
    .nav a{
      color: rgba(255,255,255,.92);
      text-decoration:none;
      font-weight: 800;
      font-size: 14px;
      padding: 10px 10px;
      border-radius: 6px;
    }
    .nav a:hover{
      background: rgba(255,255,255,.08);
    }

   
    .burger{
      display:none;
      width: 44px;
      height: 40px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,.18);
      background: rgba(255,255,255,.06);
      position: relative;
      cursor:pointer;
    }
    .burger span,
    .burger::before,
    .burger::after{
      content:"";
      position:absolute;
      left: 10px;
      right: 10px;
      height: 2px;
      background: rgba(255,255,255,.92);
      border-radius: 2px;
    }
    .burger::before{ top: 12px; }
    .burger span{ top: 19px; }
    .burger::after{ top: 26px; }

    .nav.is-open{
      display:flex;
      position:absolute;
      left:0;
      right:0;
      top: calc(100% + 10px);
      flex-direction: column;
      gap: 6px;
      padding: 10px;
      background: var(--dark2);
      border: 1px solid rgba(255,255,255,.10);
      border-radius: 10px;
      box-shadow: 0 18px 60px rgba(0,0,0,.25);
      z-index: 20;
    }
    .nav.is-open a{
      padding: 12px 12px;
      border-radius: 8px;
    }

  
    .page{ padding: 22px 0 46px; }

    .sheet{
      background: var(--sheet);
      border: 1px solid rgba(0,0,0,.08);
      border-radius: 10px;
      box-shadow: var(--shadow);
      padding: 26px 28px;
    }

    .hero h1{
      margin:0;
      font-size: 36px;
      letter-spacing: -0.6px;
    }
    .hero p{
      margin: 10px 0 0;
      color: var(--muted);
      line-height: 1.6;
      max-width: 75ch;
    }

    .section{
      margin-top: 22px;
      padding-top: 18px;
      border-top: 1px solid rgba(0,0,0,.08);
    }
    .section__head{
      display:flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }
    .section__head h2{
      margin:0;
      font-size: 18px;
      letter-spacing: -0.2px;
    }
    .link{
      text-decoration:none;
      font-weight: 900;
      color: var(--accent);
    }
    .link:hover{ text-decoration: underline; }

    .posts{
      display:grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 14px;
    }
    .post{
      border: 1px solid rgba(0,0,0,.10);
      border-radius: 0;
      background: #fff;
      padding: 14px 14px 12px;
      transition: transform .12s ease, box-shadow .12s ease;
    }
    .post:hover{
      transform: translateY(-2px);
      box-shadow: 0 14px 35px rgba(0,0,0,.12);
    }
    .post__meta{
      display:flex;
      justify-content: space-between;
      gap: 10px;
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 8px;
    }
    .tag{
      font-weight: 900;
      color: var(--accent);
    }
    .post__title{
      margin:0 0 8px;
      font-size: 16px;
      line-height: 1.25;
      letter-spacing: -0.2px;
    }
    .post__desc{
      margin:0;
      color: rgba(26,34,51,.78);
      line-height: 1.5;
      font-size: 14px;
    }
    .post__more{
      display:inline-flex;
      margin-top: 10px;
      font-weight: 900;
      color: var(--accent);
      text-decoration:none;
    }
    .post__more:hover{ text-decoration: underline; }

    
    .footer{
      background: var(--dark);
      color: rgba(255,255,255,.92);
      border-top: 1px solid rgba(255,255,255,.08);
    }

    .footer__top{
      padding: 22px 0 18px;
    }

    .footer__title{
      font-weight: 900;
      letter-spacing: -0.2px;
      font-size: 18px;
      margin-bottom: 14px;
      color: rgba(255,255,255,.95);
    }

    .footer__grid{
      display: grid;
      grid-template-columns: 1.3fr 1fr 1fr;
      gap: 18px;
      align-items: start;
    }

    .footer__h{
      font-weight: 900;
      font-size: 13px;
      opacity: .85;
      margin-bottom: 10px;
    }

    .footer__link{
      display: inline-flex;
      color: rgba(255,255,255,.88);
      text-decoration: none;
      padding: 6px 0;
      width: fit-content;
      border-bottom: 1px solid transparent;
    }
    .footer__link:hover{
      border-bottom-color: rgba(255,255,255,.25);
    }

    .footer__mini{
      margin-top: 10px;
      font-size: 13px;
      opacity: .75;
      line-height: 1.4;
    }

    .footer__bottom{
      border-top: 1px solid rgba(255,255,255,.08);
      padding: 14px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .footer__copy{
      font-size: 14px;
      opacity: .9;
    }

    .footer__pills{
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .footer__pill{
      color: rgba(255,255,255,.92);
      text-decoration: none;
      padding: 8px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,.14);
      background: rgba(255,255,255,.06);
    }
    .footer__pill:hover{
      background: rgba(255,255,255,.10);
    }

    @media (max-width: 980px){
      .topbar__row{
        grid-template-columns: 1fr;
      }
      .top-actions{ justify-content: flex-start; }
    }

    @media (max-width: 860px){
      .burger{ display:inline-flex; }
      .nav{ display:none; }
      .posts{ grid-template-columns: 1fr; }
      .sheet{ padding: 20px; }

      .footer__grid{ grid-template-columns: 1fr; }
      .footer__top{ padding-bottom: 16px; }
    }
 /* ===== Code block (docs-like) ===== */
.codebox{
  margin: 16px 0;
  padding: 14px 16px;

  background: #f3f4f6;
border: 1px solid rgba(15,23,42,.12);

  border-radius: 12px;

  overflow: auto;                      
  -webkit-overflow-scrolling: touch;

  box-shadow: 0 1px 0 rgba(0,0,0,.04); 
}

.codebox code{
  display: block;

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;

  font-size: 14px;
  line-height: 1.55;

  color: #0b1220;                      
  white-space: pre;                    
}


.codebox ::selection{
  background: rgba(0,0,0,.12);
}


.content .codebox{
  margin-top: 14px;
  margin-bottom: 14px;
}



.code-container{
  position: relative;
  margin: 16px 0;
}

.copy-btn{
  position: absolute;
  top: 10px;
  right: 10px;

  opacity: 0;
  transition: opacity .2s ease;

  font-size: 13px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  cursor: pointer;
  z-index: 2;
}

.code-container:hover .copy-btn{
  opacity: 1;
}

.copy-btn.is-ok{
  opacity: 1;
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}



#reactions{
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reaction-btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  transition: transform .06s ease, border-color .15s ease, box-shadow .15s ease;
}

.reaction-btn:hover{
  border-color: #1BAD96;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.reaction-btn:active{
  transform: translateY(1px);
}

.reaction-btn span{
  font-weight: 700;
  color: #1BAD96;
  min-width: 18px;
  text-align: center;
}


/* ===== Править после правки кривого парсера ===== */

.content{
  font-size: 20px;                
  line-height: 1.85;            
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}


.content *{
  font-size: inherit;
  line-height: inherit;
}


.codebox code{
  font-size: 16px;
  line-height: 1.6;
}


.content br{
  display: block;
  margin-bottom: 12px;
  content: "";
}


.content img{
  display: block;
  max-width: 100%;
  height: auto;
  margin: 26px 0;
  border-radius: 12px;
}
